Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
```
it.only('sends the mss multicodec', (done) => {
const p = pullPair()
const dialer = multiplex.dialer(p[0])
const listener = multiplex.listener(p[1])
let dialerConn
let listenerConn
listener.on('stream', (conn) => {
listenerConn = conn
mountMultistream()
})
dialerConn = dialer.newStream()
function mountMultistream () {
parallel([
(cb) => {
const msd = new mss.Dialer()
msd.handle(dialerConn, cb)
},
(cb) => {
const listener = new mss.Listener()
msd.handle(listenerConn, cb)
}
], done)
}
})
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.