Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webrtc-swarm

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-swarm - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

3

index.js

@@ -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)

2

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc