New version of NSD API implementation

There is a new version of my NSD API implementation on github.

New features are:

  • implementation on top of socket.io in addition to WebSocket, so as to allow the use with some smart TVs:
    • start org.coltram.nsd.websocket.ConsoleApplication for a WebSocket-based service, and org.coltram.nsd.socketio.ConsoleApplication for the socket.io based version.
    • the webapps are almost identical: for WebSocket, include script nsdLib.js; for socket.io, include socket.io.js and nsdLibSocketIO.js, and that is it.
  • implementation of a UPnP-style event mechanism, on top of both UPnP and Bonjour
  • exposing a service is simpler as there is no more need to provide both an interface description and a service implementation. The service implementation is automatically analysed to create an interface description.

There are new samples for all variants. The names are self-explanatory:

  • callBonjour.socketio.html
  • callBonjour.websocket.html
  • callBonjourEvent.socketio.html
  • callUPnP.socketio.html
  • callUPnP.websocket.html
  • callUPnPEvent.socketio.html
  • discovery.socketio.html
  • discovery.websocket.html
  • exposeBonjour.socketio.html
  • exposeBonjour.websocket.html
  • exposeBonjourEvent.socketio.html
  • exposeUPnP.socketio.html
  • exposeUPnP.websocket.html
  • exposeUPnPEvent.socketio.html

The socket.io library used is netty-socketio (MIT license).

Here are binary versions: websocket and socket.io.

Enjoy.

 

One thought on “New version of NSD API implementation”

Leave a Reply

Your email address will not be published. Required fields are marked *