Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
direct.dial(maddr, { config: {} }, (err, conn) => {
if (err) {
console.log(`[dialer] Failed to open connection: ${err}`)
}
console.log('[dialer] Opened connection')
const muxer = mplex.dialer(conn)
const stream = muxer.newStream((err) => {
console.log('[dialer] Opened stream')
if (err) throw err
})
pull(
pull.values(['hey, how is it going. I am the dialer']),
stream
)
})
}