https://github.com/guerrerocarlos/super-ssdp
SSDP for peer to peer Node.js apps
https://github.com/guerrerocarlos/super-ssdp
Last synced: about 2 months ago
JSON representation
SSDP for peer to peer Node.js apps
- Host: GitHub
- URL: https://github.com/guerrerocarlos/super-ssdp
- Owner: guerrerocarlos
- Created: 2014-07-18T21:56:24.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-19T05:13:30.000Z (almost 11 years ago)
- Last Synced: 2025-04-30T03:49:29.958Z (about 2 months ago)
- Language: JavaScript
- Size: 242 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
super-ssdp
=========Implements a API for peer2peer aplications based based in peer-ssdp node module
that implements the SSDP device discovery as specified in
http://www.upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.0-20080424.pdfInstallation
------------
npm install super-ssdpUsage
-----
Announce your peer with ssdp.createPeer()```
var ssdp = require('super-ssdp');
var ip = require('ip')
ssdp.createPeer({'name': 'CoolP2PAplicationName', 'url':'http://'+ip.address()+':8080'});
```Only peers with the same 'name' will be discovered in the local network.
Every time a new Peer connects, the 'found' signal is emitted:
````
peer.start()peer.on('found', function(address){
console.log('OTHER PEER FOUND!!!! >>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<', address)
})````