IOWebSocketChannel constructor

IOWebSocketChannel(
  1. FutureOr<WebSocket> webSocket
)

Creates a channel wrapping webSocket.

Implementation

IOWebSocketChannel(FutureOr<WebSocket> webSocket)
    : super(webSocket is Future<WebSocket>
          ? webSocket.then(IOWebSocket.fromWebSocket) as FutureOr<IOWebSocket>
          : IOWebSocket.fromWebSocket(webSocket));