chore: nicer addr name in README

This commit is contained in:
Dirk McCormick 2019-04-29 23:03:32 +08:00 committed by Jacob Heun
parent fb206cfd66
commit 1a2fd636eb
No known key found for this signature in database
GPG Key ID: CA5A94C15809879F

View File

@ -44,7 +44,7 @@ const multiaddr = require('multiaddr')
const pipe = require('it-pipe')
const { collect } = require('streaming-iterables')
const mh = multiaddr('/ip4/127.0.0.1/tcp/9090')
const addr = multiaddr('/ip4/127.0.0.1/tcp/9090')
const tcp = new TCP()
@ -56,10 +56,10 @@ const listener = tcp.createListener((socket) => {
)
})
await listener.listen(mh)
await listener.listen(addr)
console.log('listening')
const socket = await tcp.dial(mh)
const socket = await tcp.dial(addr)
const values = await pipe(
socket,
collect