@libp2p/tcp 3.0.7 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -43,8 +43,8 @@ import all from 'it-all'
43
43
 
44
44
  // A simple upgrader that just returns the MultiaddrConnection
45
45
  const upgrader = {
46
- upgradeInbound: maConn => maConn,
47
- upgradeOutbound: maConn => maConn
46
+ upgradeInbound: async maConn => maConn,
47
+ upgradeOutbound: async maConn => maConn
48
48
  }
49
49
 
50
50
  const tcp = new TCP()
@@ -64,7 +64,7 @@ const addr = multiaddr('/ip4/127.0.0.1/tcp/9090')
64
64
  await listener.listen(addr)
65
65
  console.log('listening')
66
66
 
67
- const socket = await tcp.dial(addr)
67
+ const socket = await tcp.dial(addr, { upgrader })
68
68
  const values = await pipe(
69
69
  socket,
70
70
  all
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/tcp",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p-tcp#readme",