using InABox.Core;

namespace InABox.Rpc
{
    
    public interface IRpcServerTransport : IRpcTransport
    {
        void AddHandler<TSender, TCommand, TProperties, TResult>(RpcCommandHandler<TSender, TCommand, TProperties, TResult> handler)
            where TSender : class
            where TCommand : IRpcCommand<TProperties, TResult>
            where TProperties : IRpcCommandParameters, new()
            where TResult : IRpcCommandResult, new();
 
        void Start();

        void Stop();

        event RpcTransportMessageEvent BeforeMessage;
        
        event RpcTransportMessageEvent AfterMessage;

        bool IsSecure();

    }
}