Beispiel #1
0
        public WChannel(WebSocket webSocket, AService service) : base(service, ChannelType.Connect)
        {
            this.webSocket = webSocket;

            this.memoryStream = this.GetService().MemoryStreamManager.GetStream("message", ushort.MaxValue);
            this.recvStream   = this.GetService().MemoryStreamManager.GetStream("message", ushort.MaxValue);

            isConnected = false;
        }
Beispiel #2
0
        public WChannel(HttpListenerWebSocketContext webSocketContext, AService service) : base(service, ChannelType.Accept)
        {
            this.WebSocketContext = webSocketContext;

            this.webSocket = webSocketContext.WebSocket;

            this.memoryStream = this.GetService().MemoryStreamManager.GetStream("message", ushort.MaxValue);
            this.recvStream   = this.GetService().MemoryStreamManager.GetStream("message", ushort.MaxValue);

            isConnected = true;
        }
Beispiel #3
0
 protected AChannel(AService service, ChannelType channelType)
 {
     this.ChannelType = channelType;
     this.Service     = service;
 }