IOWebSocketChannel constructor
IOWebSocketChannel(
- WebSocket socket
Creates a channel wrapping socket
.
Implementation
IOWebSocketChannel(WebSocket socket)
: _webSocket = socket,
stream = socket.handleError(
(Object? error) => throw WebSocketChannelException.from(error)),
sink = _IOWebSocketSink(socket),
_readyCompleter = Completer()..complete();