public WChannel(WebSocket webSocket, AService service) : base(service, ChannelType.Connect) { this.webSocket = webSocket; memoryStream = GetService().MemoryStreamManager.GetStream("message", ushort.MaxValue); recvStream = GetService().MemoryStreamManager.GetStream("message", ushort.MaxValue); isConnected = false; }
public WChannel(HttpListenerWebSocketContext webSocketContext, AService service) : base(service, ChannelType.Accept) { WebSocketContext = webSocketContext; webSocket = webSocketContext.WebSocket; memoryStream = GetService().MemoryStreamManager.GetStream("message", ushort.MaxValue); recvStream = GetService().MemoryStreamManager.GetStream("message", ushort.MaxValue); isConnected = true; }
protected AChannel(AService service, ChannelType channelType) { Id = IdGenerater.GenerateId(); ChannelType = channelType; Service = service; }