p2p/protocol/multistream/multistream library

Package multistream implements a simple stream router for the multistream-select protocol. The protocol is defined at https://github.com/multiformats/multistream-select

Classes

Handler
A handler for a specific protocol
MultistreamMuxer
MultistreamMuxer is a muxer for multistream. Depending on the stream protocol tag it will select the right handler and hand the stream off to it.

Constants

protocolID → const String
ProtocolID identifies the multistream protocol itself and makes sure the multistream muxers on both sides of a channel can work with each other.

Exceptions / Errors

IncorrectVersionException
IncorrectVersionException is an error reported when the muxer protocol negotiation fails because of a ProtocolID mismatch.
MessageTooLargeException
ErrTooLarge is an error to signal that an incoming message was too large