Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        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);
        }