Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

docs: fix readme example #207

Merged
merged 1 commit into from
Sep 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import all from 'it-all'

// A simple upgrader that just returns the MultiaddrConnection
const upgrader = {
upgradeInbound: maConn => maConn,
upgradeOutbound: maConn => maConn
upgradeInbound: async maConn => maConn,
upgradeOutbound: async maConn => maConn
}

const tcp = new TCP()
Expand All @@ -64,7 +64,7 @@ const addr = multiaddr('/ip4/127.0.0.1/tcp/9090')
await listener.listen(addr)
console.log('listening')

const socket = await tcp.dial(addr)
const socket = await tcp.dial(addr, { upgrader })
const values = await pipe(
socket,
all
Expand Down