Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

##Network Service Discovery API implementation

This is an implementation of the Network Service Discovery API [] on top of UPnP and Bonjour as a Java proxy for any modern browser, coupled with a JS library. The JS library handles the connection with the Java proxy through WebSocket and JSON messages. This has been tested on PCs and Macs, with recent versions of Chrome, Firefox, Safari and Opera. It also works on Windows 7/IE10. Linux should not be a problem, but was not tested.

The project structure is compatible with Maven, and a pom.xml is provided.

What's new

Version 2:

  • Latest NSD draft as of Nov 1, 2013
  • Many bug fixes
  • Refactoring

Quick start

You can run the agent in a terminal with the command line:

java -jar nsd-websocket-jar-with-dependencies.jar


java -jar nsd-socketio-jar-with-dependencies.jar

depending on which communication protocol you want to use between the browser and the proxy.

You have to the agent in the terminal if you want to see the error log.

You need to run the agent before you load any of the examples in a browser.

You need to have access to a web server, and be able to place documents in its document root.

Place the content of the examples directory in the document root of your web server. Also place a copy of the js directory in the document root. Also place a copy of the content of so that your document root looks like:

drwxr-xr-x   6 admin   204 Mar 13 11:16 bootstrap
-rw-r--r--   1 admin  2135 Aug 19 12:58 callBonjour.socketio.html
-rw-r--r--   1 admin  2035 Aug 19 12:58 callBonjour.websocket.html
-rw-r--r--   1 admin  2573 Aug 19 12:58 callBonjourEvent.socketio.html
-rw-r--r--   1 admin  2220 Aug 19 12:58 callUPnP.socketio.html
-rw-r--r--   1 admin  2120 Aug 19 12:58 callUPnP.websocket.html
-rw-r--r--   1 admin  2658 Aug 19 12:58 callUPnPEvent.socketio.html
-rw-r--r--   1 admin  2639 Aug 19 12:58 discovery.socketio.html
-rw-r--r--   1 admin  2539 Aug 19 12:58 discovery.websocket.html
-rw-r--r--   1 admin  2043 Aug 19 12:58 exposeBonjour.socketio.html
-rw-r--r--   1 admin  1943 Aug 19 12:58 exposeBonjour.websocket.html
-rw-r--r--   1 admin  2048 Aug 19 12:58 exposeBonjourEvent.socketio.html
-rw-r--r--   1 admin  2034 Aug 19 12:58 exposeUPnP.socketio.html
-rw-r--r--   1 admin  1934 Aug 19 12:58 exposeUPnP.websocket.html
-rw-r--r--   1 admin  2039 Aug 19 12:58 exposeUPnPEvent.socketio.html
drwxr-xr-x  11 admin   374 Aug 19 12:58 js
drwxr-xr-x   4 admin   136 Aug 19 12:58 res

More information

Please see these blog posts for more information:

This NSD agent uses open source libraries:

The examples use Bootstrap (Apache v2 license) and jQuery (MIT License).


Network Service Discovery API implementation



No releases published


No packages published
You can’t perform that action at this time.