close method
Closes the stream for both reading and writing
Implementation
@override
Future<void> close() async {
if (_isClosed) return;
try {
await _underlyingMuxedStream.close();
} catch (e) {
// Log error, but proceed with local cleanup
print('Error closing underlying muxed stream: $e');
} finally {
await _handleResetOrClose();
}
}