Skip to content
A peer to peer discovery network
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
LICENCE
README.md
browser.js
index.js
package.json

README.md

discovery-network

A peer to peer discovery network in the cloud

Example

See webrtc-stream for more detailed example

var conn = Connection()

// identify yourself to discovery network connection
conn.identify(userObject)

// open peer & webrtc networks
var peerNetwork = PeerNetwork(conn)
    , webrtcNetwork = WebRTCNetwork(conn)

// when you detect a new peer joining, open a PC to them
peerNetwork.on("peer", handlePeer)

// incoming offer from another peer
webrtcNetwork.on("offer", handleOffer)

// incoming answers from another peer
webrtcNetwork.on("answer", handleAnswer)

// incoming candidates from another peer
webrtcNetwork.on("candidate", handleCandidate)

Installation

npm install discovery-network

Contributors

  • Raynos

MIT Licenced

Something went wrong with that request. Please try again.