webrtc-swarm
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -14,2 +14,3 @@ var SimplePeer = require('simple-peer') | ||
swarm.maxPeers = opts.maxPeers || Infinity | ||
swarm.peers = [] | ||
@@ -55,2 +56,3 @@ | ||
if (data.type === 'connect') { | ||
if (swarm.peers.length >= swarm.maxPeers) return cb() | ||
if (remotes[data.from]) return cb() | ||
@@ -71,2 +73,3 @@ | ||
var connect = function () { | ||
if (swarm.peers.length >= swarm.maxPeers) return | ||
hub.broadcast('all', {type: 'connect', from: me}, function () { | ||
@@ -73,0 +76,0 @@ setTimeout(connect, swarm.peers.length ? 15000 : 5000) |
{ | ||
"name": "webrtc-swarm", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Create a swarm of p2p connections using webrtc and a signalhub", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4728
83