All Projects → diversario → Node Ssdp

diversario / Node Ssdp

Licence: mit
node.js SSDP client/server.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Node Ssdp

Sharppcap
Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets
Stars: ✭ 665 (+168.15%)
Mutual labels:  packets
Libtins
High-level, multiplatform C++ network packet sniffing and crafting library.
Stars: ✭ 1,609 (+548.79%)
Mutual labels:  packets
Audionetwork
Data transmission over sound waves written in JavaScript without any dependencies. All you need is just microphone, speakers and the browser!
Stars: ✭ 173 (-30.24%)
Mutual labels:  packets
Solarthing
Monitors an Outback MATE and a Renogy Rover - MPPT Charge Controller. Integrates with Grafana, PVOutput and more!
Stars: ✭ 33 (-86.69%)
Mutual labels:  packets
Pawn.raknet
🛡 Plugin for SA:MP server that allows you to analyze RakNet traffic
Stars: ✭ 89 (-64.11%)
Mutual labels:  packets
Passer
Passive service locator, a python sniffer that identifies servers, clients, names and much more
Stars: ✭ 144 (-41.94%)
Mutual labels:  packets
Ostinato
Ostinato - Packet/Traffic Generator and Analyzer
Stars: ✭ 513 (+106.85%)
Mutual labels:  packets
Trackerjacker
Like nmap for mapping wifi networks you're not connected to, plus device tracking
Stars: ✭ 2,307 (+830.24%)
Mutual labels:  packets
Libpnet
Cross-platform, low level networking using the Rust programming language.
Stars: ✭ 1,322 (+433.06%)
Mutual labels:  packets
Netcode
A protocol for secure client/server connections over UDP
Stars: ✭ 2,121 (+755.24%)
Mutual labels:  packets
Xdp
Package xdp allows one to use XDP sockets from the Go programming language.
Stars: ✭ 36 (-85.48%)
Mutual labels:  packets
Smart Buffer
smart-buffer is a Buffer wrapper that adds automatic read & write offset tracking, string operations, data insertions, and more.
Stars: ✭ 73 (-70.56%)
Mutual labels:  packets
Goworld
Scalable Distributed Game Server Engine with Hot Swapping in Golang
Stars: ✭ 2,007 (+709.27%)
Mutual labels:  packets
Node Minecraft Protocol
Parse and serialize minecraft packets, plus authentication and encryption.
Stars: ✭ 697 (+181.05%)
Mutual labels:  packets
Packetserial
An Arduino Library that facilitates packet-based serial communication using COBS or SLIP encoding.
Stars: ✭ 177 (-28.63%)
Mutual labels:  packets
Pyexfil
A Python Package for Data Exfiltration
Stars: ✭ 554 (+123.39%)
Mutual labels:  packets
Barbatunnel
A layer that hide, redirect. forward, re-encrypt internet packet to keep VPN, Proxies and other p2p software hidden from Firewall. Free implementation for HTTP-Tunnel, UDP-Tunnel, port forwarding, port redirecting and packet re-encryption that can work in network data-link layer and transport layer
Stars: ✭ 128 (-48.39%)
Mutual labels:  packets
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (-12.9%)
Mutual labels:  packets
Pkuremote
A port rewritting utility to modify the source or destination port for packets on Windows.
Stars: ✭ 185 (-25.4%)
Mutual labels:  packets
Simplenet
An easy-to-use, event-driven, asynchronous network application framework compiled with Java 11.
Stars: ✭ 164 (-33.87%)
Mutual labels:  packets

Build Status Coverage Status Dependency Status NPM version

Installation

npm install node-ssdp

There is another package called ssdp which is the original unmaintained version. Make sure to install node-ssdp instead.

Usage - Client

    var Client = require('node-ssdp').Client
      , client = new Client();

    client.on('response', function (headers, statusCode, rinfo) {
      console.log('Got a response to an m-search.');
    });

    // search for a service type
    client.search('urn:schemas-upnp-org:service:ContentDirectory:1');

    // Or get a list of all services on the network

    client.search('ssdp:all');

Usage - Server

    var Server = require('node-ssdp').Server
      , server = new Server()
    ;

    server.addUSN('upnp:rootdevice');
    server.addUSN('urn:schemas-upnp-org:device:MediaServer:1');
    server.addUSN('urn:schemas-upnp-org:service:ContentDirectory:1');
    server.addUSN('urn:schemas-upnp-org:service:ConnectionManager:1');

    server.on('advertise-alive', function (headers) {
      // Expire old devices from your cache.
      // Register advertising device somewhere (as designated in http headers heads)
    });

    server.on('advertise-bye', function (headers) {
      // Remove specified device from cache.
    });

    // start the server
    server.start();

    process.on('exit', function(){
      server.stop() // advertise shutting down and stop listening
    })

Take a look at example directory as well to see examples or client and server.

Configuration

Client

const Client = require('node-ssdp').Client
const client = new Client({...})
  • interfaces String[] List of interfaces to explicitly bind. By default, bind to all available interfaces.
  • explicitSocketBind Boolean Bind sockets to each discovered interface explicitly instead of relying on the system. Might help with issues with multiple NICs.
  • customLogger Function A logger function to use instead of the default. The first argument to the function can contain a format string.
  • reuseAddr Boolean When true socket.bind() will reuse the address, even if another process has already bound a socket on it. Default: true

Server

const Server = require('node-ssdp').Server
const server = new Server({...})
  • location String URL pointing to description of your service, or a function which returns that URL
  • location Object For cases where there are multiple network interfaces or IP of the host isn't known in advance, it's possible to specify location as an object. Host will be set to the IP of the responding interface.
    • location.protocol String Location protocol, defaults to http://
    • location.port Number Location port. No default.
    • location.path String Location path. No default.
  • udn String Unique Device Name. Default: uuid:f40c2981-7329-40b7-8b04-27f187aecfb5.
  • allowWildcards Boolean Accept wildcards (*) in serviceTypes of M-SEARCH packets, e.g. usn:Belkin:device:**. Default: false
  • interfaces String[] List of interfaces to explicitly bind. By default, bind to all available interfaces.
  • explicitSocketBind Boolean Bind sockets to each discovered interface explicitly instead of relying on the system. Might help with issues with multiple NICs.
  • customLogger Function A logger function to use instead of the default. The first argument to the function can contain a format string.
  • suppressRootDeviceAdvertisements Boolean When true the SSDP server will not advertise the root device (i.e. the bare UDN). In some scenarios this advertisement is not needed. Default: false
  • reuseAddr Boolean When true socket.bind() will reuse the address, even if another process has already bound a socket on it. Default: true
  • adInterval Number advertise event frequency (ms). Default: 10 sec.
  • ttl Number Packet TTL. Default: 1800.

SSDP configuration:

  • ssdpSig String SSDP signature. Default: node.js/NODE_VERSION UPnP/1.1 node-ssdp/PACKAGE_VERSION
  • ssdpIp String SSDP multicast group. Default: 239.255.255.250.
  • ssdpPort Number SSDP port. Default: 1900
  • ssdpTtl Number Multicast TTL. Default: 4

Logging

You can enable logging via an environment variable DEBUG. Set DEBUG=node-ssdp:* to enable all logs. To enable only client or server logs, use DEBUG=node-ssdp:client or DEBUG=node-ssdp:server respectively.

Alternatively, you can provide your own customLogger function, in which case the DEBUG environment variable will be ignored.

License

(The MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Analytics

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].