close method

  1. @override
Future close()
override

Disposes of any outstanding resources.

Implementation

@override
Future close() async {
  on._close();
  scheduleMicrotask(() async {
    await _socket!.sink.close(status.goingAway);
    await _onData.close();
    await _onAllEvents.close();
    await _onAuthenticated.close();
    await _onError.close();
    await _onServiceEvent.close();
    await _onWebSocketChannelException.close();
  });
}