dispose method

Future<void> dispose()
override

Disposes the underlying socket client explicitly. Only use this, if you want to disconnect from the current server in favour of another one. If that's the case, create a new WebSocketLink instance.

Implementation

Future<void> dispose() async {
  await _socketClient?.dispose();
  _socketClient = null;
}