mafintosh / webrtc-swarm

Create a swarm of p2p connections using webrtc and a signalhub
MIT License
380 stars 60 forks source link

does not appear to be working. #5

Closed piedshag closed 8 years ago

piedshag commented 8 years ago

Using the following code in the browser webrtc-swarm does not appear to be able to create more than two connections. If i refresh two tabs at exactly the same time they will connect but when i try and connect more they simply seem to be ignored. All clients are subscribing to the hub but the first two only seem to be able to make a connection. Have you had this working recently. Thanks.

var signalhub = require('signalhub')
var swarm = require('webrtc-swarm')

var hub = signalhub('myapp', [
  'http://localhost:8080'
])

var sw = swarm(hub)

sw.on('peer', function (peer) {
    console.log(peer)
})
max-mapper commented 8 years ago

looking into this now

max-mapper commented 8 years ago

I fixed the example :D