mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-04-25 14:32:34 +00:00
chore: nicer addr name in README
This commit is contained in:
parent
fb206cfd66
commit
1a2fd636eb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user