WebSocketSession constructor
WebSocketSession(
- WebSocketChannel channel,
- Request request, {
- String? negotiatedProtocol,
Wraps channel, opened by request.
negotiatedProtocol is what the handshake settled on. shelf_web_socket
reports it alongside the channel rather than on it, and a server-side
channel leaves WebSocketChannel.protocol null, so it is carried here.
Implementation
WebSocketSession(this.channel, this.request, {String? negotiatedProtocol})
: _negotiatedProtocol = negotiatedProtocol;