dispose method

  1. @override
Future<void> dispose()

Disposes the underlying channel 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

@override
Future<void> dispose() async {
  await _close();
  _channel = null;
}