Esempio n. 1
0
 public Context(SocketChannelSelectionProcessorActor parent, Socket clientChannel)
 {
     _parent        = parent;
     _clientChannel = clientChannel;
     _consumer      = parent._provider.RequestChannelConsumer();
     _buffer        = BasicConsumerByteBuffer.Allocate(++_parent._bufferId, _parent._messageBufferSize);
     _id            = $"{++_parent._contextId}";
     _writables     = new Queue <IConsumerByteBuffer>();
 }
Esempio n. 2
0
 public Context(SocketChannelSelectionProcessorActor parent, Socket clientChannel)
 {
     _parent        = parent;
     _clientChannel = clientChannel;
     _consumer      = parent._provider.RequestChannelConsumer();
     _buffer        = parent._requestBufferPool.Acquire();
     _id            = $"{++_parent._contextId}";
     _writables     = new Queue <IConsumerByteBuffer>();
 }