dispose method
Disposes channel subscriptions and closes the outbound stream.
Implementation
Future<void> dispose() async {
if (_disposed) return;
_disposed = true;
await _outputSubscription?.cancel();
await _inboundSubscription?.cancel();
await _outboundController.close();
}