onConnect abstract method

FutureOr<bool> onConnect(
  1. RemoteClient client, [
  2. Map? connectionParams
])

Whether to accept the connection, given the client's connection_init payload.

Answer false to refuse it; this is where authentication belongs.

Implementation

FutureOr<bool> onConnect(RemoteClient client, [Map? connectionParams]);