write method
Writes data to the stream
Implementation
@override
Future<void> write(Uint8List data) async {
if (_isClosed) {
throw ResetException('Stream is closed');
}
try {
await _underlyingMuxedStream.write(data);
} on ResetException {
await _handleResetOrClose();
rethrow;
} catch (e) {
await _handleResetOrClose();
throw ResetException('Write error: $e');
}
}