connected property
The first argument is actually the WebSocket
, but to avoid
bundling DOM typings because the client can run in Node env too,
you should assert the websocket type during implementation.
Also, the second argument is the optional payload that the server may
send through the ConnectionAck
message.
Implementation
final T? Function(WebSocketChannel socket, Map<String, Object?>? payload)?
connected;