MultistreamSelect class

libp2p multistream-select / protocol negotiation.

Constructors

MultistreamSelect()

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 Properties

The multistream header: <protocolId>\n as UTF-8 bytes.
no setter
ls Uint8List
Encode the ls command.
no setter
na Uint8List
Encode the NA (not available) response.
no setter

Static Methods

encodeLengthPrefixed(Uint8List data) Uint8List
Prepend a QUIC varint length prefix to data.
encodeProtocol(String protocol) Uint8List
Encode a single protocol selection.
encodeProtocols(List<String> protocols) Uint8List
Encode a protocol list: <protocol>\n for each.
parseLengthPrefixed(Uint8List data) → (Uint8List, int)?
Read a varint length prefix and the following message from data.
parseMessages(Uint8List bytes) List<String>
Parse incoming multistream-select messages.

Constants

newline → const String
protocolId → const String