newMultistream function

LazyConn newMultistream(
  1. P2PStream stream,
  2. ProtocolID proto
)

NewMultistream returns a multistream for the given protocol. This will not perform any protocol selection. If you are using a MultistreamMuxer, use NewMSSelect.

Implementation

LazyConn newMultistream(P2PStream<dynamic> stream, ProtocolID proto) {
  return _LazyClientConn(
    protos: [proto],
    stream: stream,
  );
}