read method
Reads data from the stream
Implementation
@override
Future<Uint8List> read([int? maxLength]) async {
return await YamuxExceptionHandler.handleYamuxOperation<Uint8List>(
() async => await _performRead(maxLength),
streamId: streamId,
operationName: 'read',
currentState: _state.name, // Use .name instead of .toString() to get just "reset" instead of "YamuxStreamState.reset"
context: {
'maxLength': maxLength,
'queueLength': _incomingQueue.length,
'localReadClosed': _localReadClosed,
},
);
}