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)); }
public TransportConnectionStateValidator() { _handler = new TransportHeaderHandler <Nothing, Nothing>(Handle, Handle); _connectionHandler = new TransportConnectionHeaderHandler <Nothing, Nothing>(Handle, Handle); }