Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring libp2p-websocket-star to the Transports family! 🌟 #122

Merged
merged 8 commits into from
Nov 27, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
refactor: websocket-star-{signal => rendezvous}
  • Loading branch information
mkg20001 committed Oct 28, 2017
commit 0e2793f257c36b4946d50bfd5ef4bc563ef01ff8
4 changes: 2 additions & 2 deletions .aegir.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const PeerId = require('peer-id')
const pull = require('pull-stream')

const sigServer = require('libp2p-webrtc-star/src/sig-server')
const WSsigServer = require('libp2p-websocket-star-rendezvous')
const wsRendezvous = require('libp2p-websocket-star-rendezvous')
let server
let server2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we now have two "servers", let's use qualifying names:

  • wrtcRendezvous
  • wsRendezvous


Expand All @@ -27,7 +27,7 @@ const before = (done) => {
ready()
})

WSsigServer.start({
wsRendezvous.start({
port: 14444,
refreshPeerListIntervalMS: 1000,
strictMultiaddr: false
Expand Down
4 changes: 2 additions & 2 deletions test/nodejs-bundle/tcp+websockets+websocket-star.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const chai = require('chai')
chai.use(require('dirty-chai'))
const expect = chai.expect
const parallel = require('async/parallel')
const signalling = require('libp2p-websocket-star-signal')
const rendezvous = require('libp2p-websocket-star-rendezvous')
const WStar = require('libp2p-websocket-star')
const utils = require('./utils')
const createNode = utils.createNode
Expand All @@ -22,7 +22,7 @@ describe('TCP + WebSockets + WebSocketStar', () => {
before((done) => {
parallel([
(cb) => {
signalling.start({ port: 24642 }, (err, server) => {
rendezvous.start({ port: 24642 }, (err, server) => {
expect(err).to.not.exist()
ss = server
cb()
Expand Down