1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using InABox.Clients;
- using InABox.Core;
- namespace InABox.Rpc
- {
- public interface IRpcClientTransport : IRpcTransport
- {
- bool Ping();
- DatabaseInfo Info();
-
- /// <summary>
- /// Connect to remote server.
- /// </summary>
- /// <returns><see langword="true"/> if connection success, <see langword="false"/> otherwise.</returns>
- bool Connect();
- void Send(RpcMessage message);
-
- TResult Send<TCommand, TParameters, TResult>(TParameters parameters)
- where TCommand : IRpcCommand<TParameters,TResult>
- where TParameters : IRpcCommandParameters, ISerializeBinary
- where TResult : IRpcCommandResult, ISerializeBinary, new();
-
- void Disconnect();
-
- event RpcTransportMessageEvent OnMessage;
- bool IsConnected();
- bool IsSecure();
- string? ServerName();
- }
- }
|