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

Commit

Permalink
revert: "feat: listen to array of multiaddrs (#104)"
Browse files Browse the repository at this point in the history
This reverts commit 5009c2c.
  • Loading branch information
dirkmc authored and jacobheun committed Aug 19, 2019
1 parent c60897f commit ff9123d
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 209 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codeco
jobs:
include:
- stage: check
os: linux
script:
- npx aegir build --bundlesize
- npx aegir dep-check
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const multiaddr = require('multiaddr')
const pipe = require('it-pipe')
const { collect } = require('streaming-iterables')

const addr = multiaddr('/ip4/127.0.0.1/tcp/9090')
const mh = multiaddr('/ip4/127.0.0.1/tcp/9090')

const tcp = new TCP()

Expand All @@ -56,10 +56,10 @@ const listener = tcp.createListener((socket) => {
)
})

await listener.listen([addr])
await listener.listen(mh)
console.log('listening')

const socket = await tcp.dial(addr)
const socket = await tcp.dial(mh)
const values = await pipe(
socket,
collect
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,23 @@
"aegir": "^20.0.0",
"chai": "^4.2.0",
"dirty-chai": "^2.0.1",
"interface-transport": "~0.3.6",
"lodash.isfunction": "^3.0.9",
"pull-stream": "^3.6.9",
"sinon": "^7.3.1"
},
"dependencies": {
"abortable-iterator": "^2.0.0",
"class-is": "^1.1.0",
"debug": "^4.1.1",
"debug": "^3.1.0",
"err-code": "^1.1.2",
"interface-connection": "~0.3.3",
"interface-transport": "~0.4.0",
"interface-transport": "libp2p/interface-transport#feat/async-await",
"ip-address": "^5.8.9",
"it-pipe": "^1.0.0",
"lodash.includes": "^4.3.0",
"lodash.isfunction": "^3.0.9",
"mafmt": "^6.0.7",
"multiaddr": "^6.0.6",
"streaming-iterables": "^4.1.0"
"mafmt": "^6.0.2",
"multiaddr": "^5.0.0"
},
"contributors": [
"Alan Shaw <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class TCP {
}

handler = handler || noop
return createListener(options, handler)
return createListener(handler)
}

filter (multiaddrs) {
Expand Down
Loading

0 comments on commit ff9123d

Please sign in to comment.