connect method

Future<void> connect(
  1. dynamic onConnect(
    1. W3GResponse
    )
)

opens a connection to the server

onConnect is called once there's a connect response from the server

Implementation

Future<void> connect(Function(W3GResponse) onConnect) async {
  on("connect", onConnect);
  send({"path": "connect"});
}