StreamUtils class
Utilities for reading from P2P streams with proper handling of partial reads.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
readExactly(
P2PStream stream, int length) → Future< Uint8List> -
Reads exactly
lengthbytes from the stream. -
readLengthPrefix(
P2PStream stream) → Future< int> - Reads a 4-byte big-endian length prefix from the stream.
-
readLengthPrefixedFrame(
P2PStream stream) → Future< Uint8List> - Reads a length-prefixed frame from the stream.