disconnect method

  1. @override
Future<void> disconnect()
override

Disconnects and forgets every channel, as the real driver does: each handler is dropped, each channel leaves subscribedChannels, a confirmed channel reports false on its BroadcastChannel.onSubscriptionChanged, and that stream then ends.

Implementation

@override
Future<void> disconnect() async {
  _connected = false;
  _forgetAll();
}