WsChannelConnection.fromChannel constructor

WsChannelConnection.fromChannel(
  1. WebSocketChannel channel, {
  2. FrameCodec? codec,
})

Wraps an already-connected channel.

Implementation

factory WsChannelConnection.fromChannel(
  WebSocketChannel channel, {
  FrameCodec? codec,
}) => WsChannelConnection._(channel, codec ?? FrameCodec.standard());