コード例 #1
0
        public MultiplexService(IConnection connection, SessionIdGenerateType sessionIdGenerateType, BufferPool bufferPool)
        {
            _communicator          = new Communicator(connection);
            _sessionIdGenerateType = sessionIdGenerateType;
            _bufferPool            = bufferPool;

            _sendSessionCreateRequestInfoMap        = new Dictionary <ulong, SendSessionCreateRequestInfo>();
            _receiveSessionCreateRequestInfoChannel = Channel.CreateBounded <ReceiveSessionCreateRequestInfo>(new BoundedChannelOptions(30)
            {
                FullMode = BoundedChannelFullMode.DropOldest,
            });
            _sessionIdManager = new SessionIdGenerator(sessionIdGenerateType);

            this.Init();
        }
コード例 #2
0
 public SessionIdGenerator(SessionIdGenerateType type)
 {
     _type = type;
 }