mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-03-16 12:50:54 +00:00
abstract-stream-muxer
A test suite and interface you can use to implement a stream muxer.
Modules that implement the interface
Send a PR to add a new one if you happen to find or write one.
Badge
How to use
API
A valid (read: that follows this abstraction) stream muxer, must implement the following API.
Node.js
muxer.attach(transport, function (err, conn)) || Go
conn, err := muxer.attach(transport)
Node.js
conn.dialStream(function (err, stream)) || Go
stream, err := conn.dialStream()
Node.js
conn.on('stream', function (stream)) || Go
stream := conn.listen()
Description
Languages
JavaScript
100%