-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from progaudi/fix/reconnect
fix lost connection and reconnect automatically
- Loading branch information
Showing
13 changed files
with
465 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
|
||
using ProGaudi.MsgPack.Light; | ||
|
||
using ProGaudi.Tarantool.Client.Model.Requests; | ||
|
||
namespace ProGaudi.Tarantool.Client.Converters | ||
{ | ||
internal class PingPacketConverter : IMsgPackConverter<PingRequest> | ||
{ | ||
public void Initialize(MsgPackContext context) | ||
{ | ||
} | ||
|
||
public void Write(PingRequest value, IMsgPackWriter writer) | ||
{ | ||
} | ||
|
||
public PingRequest Read(IMsgPackReader reader) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
using ProGaudi.Tarantool.Client.Model; | ||
using ProGaudi.Tarantool.Client.Model.Requests; | ||
using ProGaudi.Tarantool.Client.Model.Responses; | ||
|
||
namespace ProGaudi.Tarantool.Client | ||
{ | ||
public interface ILogicalConnection | ||
public interface ILogicalConnection : IDisposable | ||
{ | ||
Task Connect(); | ||
|
||
bool IsConnected(); | ||
|
||
Task SendRequestWithEmptyResponse<TRequest>(TRequest request) | ||
where TRequest : IRequest; | ||
|
||
Task<DataResponse<TResponse[]>> SendRequest<TRequest, TResponse>(TRequest request) | ||
where TRequest : IRequest; | ||
|
||
TaskCompletionSource<MemoryStream> PopResponseCompletionSource(RequestId requestId, MemoryStream resultStream); | ||
|
||
IEnumerable<TaskCompletionSource<MemoryStream>> PopAllResponseCompletionSources(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
using System; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
using ProGaudi.Tarantool.Client.Model; | ||
|
||
namespace ProGaudi.Tarantool.Client | ||
{ | ||
|
||
public interface IResponseReader : IDisposable | ||
{ | ||
void BeginReading(); | ||
|
||
Task<MemoryStream> GetResponseTask(RequestId requestId); | ||
|
||
bool IsConnected(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.