Example #1
0
        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;
        }
Example #2
0
        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;
        }
Example #3
0
 protected AChannel(AService service, ChannelType channelType)
 {
     Id          = IdGenerater.GenerateId();
     ChannelType = channelType;
     Service     = service;
 }