Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
webrtc-explorer
Advanced tools
Chord inspired ring DHT algorithm using WebRTC as transport layer for P2P in the browser
tl;dr webrtc-explorer
is a Chord inspired P2P overlay network designed for the Web platform (browsers), using WebRTC as its transport between peers and WebSockets for Signaling data. Essentially, it enables your peers (browsers) to communicate between each other without the need to have a server as a mediator of messages.
![Gitter](https://badges.gitter.im/Join Chat.svg)
webrtc-explorer
uses browserify
var Explorer = require('webrtc-explorer');
var config = {
signalingURL: 'http://url-to-webrtc-ring-signaling-server.com'
};
var peer = new Explorer(config);
peer.events.on('ready', function () {
// this node is ready
});
peer.events.on('registered', function(data){
// peer registered with data.peerId
});
peer.register();
peerIds are 48 bits represented in a string using hex format. To send, in one peer:
var data = 'hey peer, how is it going';
peer.send('abcd0f0fdbca', data);
To receive, in another peer (responsible for that Id)
peer.events.on('message', function(envelope){
// message from the other peer envelope.data
});
add the logging flag to your config
var config = {
//...
logging: true
};
To understand fully webrtc-explorer's core, it is crucial to be familiar with the Chord. webrtc-explorer levarages important battle experience from building webrtc-ring - http://blog.daviddias.me/2014/12/20/webrtc-ring
soon
, I'm trying to make them as legible as possible. If you have a urgency in one of the parts, please let me know, so that I put that one as a priority.FAQs
P2P Network Routing Overlay designed for the Web platform (browsers)
The npm package webrtc-explorer receives a total of 1 weekly downloads. As such, webrtc-explorer popularity was classified as not popular.
We found that webrtc-explorer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.