reset static method
Drops all registrations and closes streams. Intended for tests.
Implementation
static Future<void> reset() async {
await _transportSubscription?.cancel();
_transportSubscription = null;
_transport = null;
_policies.clear();
_decoders.clear();
_encoders.clear();
_codecNames.clear();
for (final controller in _controllers.values) {
await controller.close();
}
_controllers.clear();
}