public Session(int sessionId, ZerioConfiguration configuration, CompletionQueues completionQueues) { Id = sessionId; _configuration = configuration; _completionQueues = completionQueues; _receivingBuffer = new UnmanagedRioBuffer <RioBufferSegment>(configuration.ReceivingBufferCount, _configuration.ReceivingBufferLength); _messageFramer = new MessageFramer(configuration.FramingBufferLength); _messageFramer.MessageFramed += OnMessageFramed; }
public SendRequestProcessingEngine(InternalZerioConfiguration configuration, IRioCompletionQueue sendingCompletionQueue, ISessionManager sessionManager) { _configuration = configuration; var ringBufferSize = configuration.SendRequestProcessingEngineRingBufferSize; _unmanagedRioBuffer = new UnmanagedRioBuffer <SendRequestEntry>(ringBufferSize, _configuration.SendingBufferLength); _disruptor = CreateDisruptor(sendingCompletionQueue, sessionManager); _ringBuffer = _disruptor.RingBuffer; }
public RequestProcessingEngine(ZerioConfiguration configuration, RioCompletionQueue sendingCompletionQueue, ISessionManager sessionManager) { _configuration = configuration; var ringBufferSize = ZerioConfiguration.GetNextPowerOfTwo(_configuration.SendingBufferCount + _configuration.ReceivingBufferCount * _configuration.SessionCount); _unmanagedRioBuffer = new UnmanagedRioBuffer <RequestEntry>(ringBufferSize, _configuration.SendingBufferLength); _disruptor = CreateDisruptor(sendingCompletionQueue, sessionManager); _ringBuffer = _disruptor.RingBuffer; }
public Session(int sessionId, InternalZerioConfiguration configuration, CompletionQueues completionQueues) { Id = sessionId; _configuration = configuration; _completionQueues = completionQueues; _receivingBuffer = new UnmanagedRioBuffer <RioBufferSegment>(configuration.ReceivingBufferCount, _configuration.ReceivingBufferLength); _messageFramer = new MessageFramer(configuration.FramingBufferLength); _messageFramer.MessageFramed += OnMessageFramed; SendingBatch = new SessionSendingBatch(configuration.SendingBufferLength); Conflater = new SendingRequestConflater(sessionId, configuration.SendingBufferLength); }