All Projects → unsetbit → P

unsetbit / P

Licence: other
Peer-to-peer networking with browsers

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to P

Spitfire
An easy to use WebRTC Datachannels library for .NET applications.
Stars: ✭ 164 (-59%)
Mutual labels:  networking, webrtc, p2p
meanOs
Mean Operating System - The first decentralized, artificially intelligent, MEAN.js stack, operating system. Mean OS is the only operating system hosted anonymous using a P2P network and a suite of non-standard in-browser delivery mechanisms. Mean OS proudly supports Brave and Tor, be free!
Stars: ✭ 62 (-84.5%)
Mutual labels:  webrtc, p2p
secure-webrtc-swarm
💢 Create a swarm of p2p connections with invited peers using WebRTC.
Stars: ✭ 23 (-94.25%)
Mutual labels:  webrtc, p2p
Diffy
🎞️💓🍿 Love streaming - It's always best to watch a movie together ! 🤗
Stars: ✭ 37 (-90.75%)
Mutual labels:  webrtc, p2p
Py Ipv8
Python implementation of the IPv8 layer
Stars: ✭ 157 (-60.75%)
Mutual labels:  networking, p2p
P2p Graph
Real-time P2P network visualization with D3
Stars: ✭ 245 (-38.75%)
Mutual labels:  networking, p2p
P2P-CKPlayer
嵌入P2P引擎的CKPlayer,视频网站省流量&加速神器
Stars: ✭ 49 (-87.75%)
Mutual labels:  webrtc, p2p
Popol
Minimal non-blocking I/O for Rust
Stars: ✭ 118 (-70.5%)
Mutual labels:  networking, p2p
rtc-ssh
WebRTC wrapper for SSH connect
Stars: ✭ 95 (-76.25%)
Mutual labels:  webrtc, p2p
peermesh
💫 Exchange files p2p and e2e encrypted over a fully meshed network in your browser using WebRTC.
Stars: ✭ 107 (-73.25%)
Mutual labels:  webrtc, p2p
go-ayame
go-ayame is go client library for WebRTC Signaling Server Ayame
Stars: ✭ 20 (-95%)
Mutual labels:  webrtc, p2p
Stun
A Go implementation of STUN
Stars: ✭ 141 (-64.75%)
Mutual labels:  networking, webrtc
Quic
A Go implementation of the QUIC API for Peer-to-peer and Client-to-Server Connections
Stars: ✭ 137 (-65.75%)
Mutual labels:  networking, webrtc
Rtp
A Go implementation of RTP
Stars: ✭ 120 (-70%)
Mutual labels:  networking, webrtc
Meething
dWebRTC Video Meetings MESH/SFU hybrid using GunDB, MediaSoup and Beyond!
Stars: ✭ 303 (-24.25%)
Mutual labels:  webrtc, p2p
P2P-DPlayer
DPLayer powered by CDNBye P2P Engine
Stars: ✭ 63 (-84.25%)
Mutual labels:  webrtc, p2p
Ice
A Go implementation of ICE
Stars: ✭ 114 (-71.5%)
Mutual labels:  networking, webrtc
P2p
P2P Cloud project allows users to build their private networks.
Stars: ✭ 116 (-71%)
Mutual labels:  networking, p2p
udpeer
A simple UDP peer to peer networking proxy using webrtc
Stars: ✭ 19 (-95.25%)
Mutual labels:  webrtc, p2p
Instant.io
🚀 Streaming file transfer over WebTorrent (torrents on the web)
Stars: ✭ 2,954 (+638.5%)
Mutual labels:  webrtc, p2p

P is for peer-to-peer networking with browsers

P is a small framework used to create browser-to-browser networks (as opposed to just a connection). With P, you can:

  • Connect to other browsers using a simple WebSocket server.
  • Connect to other browsers using your established connections to other browsers. This is what makes P unique: it allows for transitive connections across peers, allowing easy creation of mesh networks.

After a connection is established the middleman is no longer necessary – no proxies are involved.

This is made possible by an unstable and young technology -- WebRTC. Currently, only Chrome and Firefox support this technology.

onramp, a simple WebSocket server, is used as the signaling channel to establish initial connections.

API

// Initializing
var rootNode = P.create(); // create the root node

// Connection management
var webSocketNode = rootNode.connect(address); // connect to an onramp WebSocket server
var webRtcNode = webSocketNode.connect(address); // connect to a peer using an onramp connection
var webRtcNode = webRtcNode.connect(address); // connect to a peer using an existing peer connection
anyNode.close(); // close the connection
anyNode.isOpen(); // return true if the connection is open
var nodeArray = anyNode.getPeers(); // returns an array of all peer connections

// Firewalling connections
var protectedNode = P.create({
  firewall: function(offerData){
    // Only accept RTC connection offers which send 'secret' as the offer data
    // this firewall rule will apply to any child nodes as well
    return offerData === 'secret';
  }
});


// Send offerData with a connection request
anyNode.connect({address: address, offerData: 'secret'});


// Sending and receiving messages
webRtcNode.send(message); // send a message to a peer; can be json, string, or arraybuffer
webRtcNode.on('message', function(message){}); // listens for messages from a peer
webRtcNode.on('array buffer', function(arrayBuffer){}); // listens for array buffers from a peer

// Events
anyNode.on('connection', function(peerNode){}); // emitted when a connection is made via this peer
anyNode.on('open', function(){}); // emitted when this connection is open and ready
anyNode.on('close', function(){}); // emitted when this connection is closed
anyNode.on('error', function(err){}); // listens for errors for this connection
anyNode.removeListener(eventName, optionalCallback); // stops listening to an event

Documentation

Release Notes

  • 0.3.3 - Fixed an issue in FF which caused disconnections shorting after successful connections due to a GC miscommunication which seems to clean up DataChannels which are still in use (thereby closing them).
  • 0.3.2 - Updated the library to align it with the latest WebRTC standards -- mainly changes in configuration objects.
  • 0.3.1 - Added 'firewall' option to firewall RTC requests.
  • 0.3 - Major refactor of internals and simplification of API, Firefox support, and respectable unit test coverage.
  • 0.2 - Public release
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].