read method

  1. @override
Future<Uint8List> read([
  1. int? length
])
override

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);
}