Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
auto-peer.js automates the peer.js connection establishment and connects all auto-peer.js clients with each other using webRTC.
The auto-peer.js library is an experimental webRTC client/server library which relies heavily on peerjs and socket.io
The idea auto-peer.js was developed when creating a multi media installation for a couple of tablets. It should allow to communicate from tablet to tablet as fast as possible.
from http://engineering.spilgames.com/mastering-webrtc/
auto-peer.js core consists of a node websocket backend and a client side script. When the user opens the application a new client is created. This client asks the backend to tell all existing clients to establish a new webRTC connection.
Take a look at the example directory.
Server
var app = require('express')();
var http = require('http').Server(app);
var autoPeer = require('auto-peer')(http);
app.get('/', function (req, res) {
res.sendFile(__dirname + '/index.html');
});
http.listen(3000, function () {
console.log('listening on *:3000');
});
Client
<script src="/auto-peer.min.js"></script>
<script>
// Please get your own free key at http://peerjs.com/
var autoPeer = new AutoPeer({key: 'lwjd5qra8257b9'});
autoPeer.on('data', function(data){
console.log('received data', data);
});
autoPeer.send('This is a message to all connected peers');
</script>
auto-peer.js is an experimental library and was not meant to be used in productive environment. As a client is able to send commands to any other client you should never evaluate html or javascript code transmitted by auto-peer.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Copyright (c) 2014 Jan Nicklas. Licensed under the MIT license.
FAQs
Automatic peer connection
The npm package auto-peer receives a total of 24 weekly downloads. As such, auto-peer popularity was classified as not popular.
We found that auto-peer 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.