Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A peer to peer discovery network
JavaScript
tree: d31b4847d4

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
connections
example
networks
relays
.gitignore
LICENCE
README.md
browser.js
index.js
log.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.