read method
Reads data from the connection.
If length
is provided, reads exactly that many bytes.
Otherwise, reads whatever is available.
Implementation
@override
Future<Uint8List> read([int? length]) async {
// For negotiation purposes, read from the initial stream.
// The 'length' parameter for TransportConn.read is a suggestion,
// P2PStream.read also takes an optional maxLength.
_logger.fine('[UDXSessionConn $id] read() delegating to initialP2PStream.read(length: $length)');
return initialP2PStream.read(length);
}