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(); }
public SessionIdGenerator(SessionIdGenerateType type) { _type = type; }