p2p/protocol/multistream/lazy_client library
Package multistream implements lazy client functionality for the multistream-select protocol. The protocol is defined at https://github.com/multiformats/multistream-select
Classes
- LazyConn
- LazyConn is a ReadWriteCloser adapter that lazily negotiates a protocol using multistream-select on first use.
Functions
-
newMSSelect(
P2PStream stream, ProtocolID proto) → LazyConn - NewMSSelect returns a new Multistream which is able to perform protocol selection with a MultistreamMuxer.
-
newMultistream(
P2PStream stream, ProtocolID proto) → LazyConn - NewMultistream returns a multistream for the given protocol. This will not perform any protocol selection. If you are using a MultistreamMuxer, use NewMSSelect.