IOWebSocketChannel constructor

IOWebSocketChannel(WebSocket socket)

Creates a channel wrapping socket.

Implementation

IOWebSocketChannel(WebSocket socket)
    : _webSocket = socket,
      stream = socket.handleError(
          (error) => throw new WebSocketChannelException.from(error)),
      sink = new _IOWebSocketSink(socket);