Пример #1
0
 public ProtobufTransportProtocolSerializer()
 {
     _log = LogManager.GetLogger <ProtobufTransportProtocolSerializer>();
     _transportHeaderHandler  = new TransportHeaderHandler <IPooledBuffer, Nothing>(Handle, Handle);
     _channelHeaderHandler    = new TransportChannelHeaderHandler <IPooledBuffer, Nothing>(Handle, Handle, Handle);
     _connectionHeaderHandler = new TransportConnectionHeaderHandler <IPooledBuffer, Nothing>(Handle, Handle);
 }
 public TransportReceiveProcessor(
     ITransmissionConnection connection,
     ITransportProtocolDeserializer deserializer)
 {
     InstanceId        = connection.Id;
     _log              = LogManager.GetLogger <TransportReceiveProcessor>(InstanceId.ToString());
     _receiveProcessor = new MessagingReceiveProcessor(connection, deserializer);
     _handler          = new TransportHeaderHandler <Task, Maybe <IPooledBuffer> >(
         HandleConnetionHeaderAsync,
         HandleChannelHeaderAsync);
     _buffer.Out.PropagateCompletionFrom(ProcessAsync());
     In.Completion.LogCompletion(_log);
 }
 public T Handle <T, TArgs>(TransportHeaderHandler <T, TArgs> handler, TArgs args = default)
 {
     return(handler.Handle(this, args));
 }
Пример #4
0
 public TransportConnectionStateValidator()
 {
     _handler           = new TransportHeaderHandler <Nothing, Nothing>(Handle, Handle);
     _connectionHandler = new TransportConnectionHeaderHandler <Nothing, Nothing>(Handle, Handle);
 }