- a program for announcing the network UPnP/DLNA devices.
Announcements are sent using IPv4 and IPv6 on the special multicast address.
SSDP announcer allows you announce on your LAN any UPnP / DLNA server located on the Internet, another network segment.
UPnP - based on the SSDP announcements for automatic detection of available devices on the local network, and HTTP to communicate with devices it has found.
In HTTP, the data is transmitted using XML-SOAP.
Archive with SSDP announcer contains implementation UPnP / DLNA server on nginx and PHP.
Nginx takes on work with http, php script processes the XML-SOAP requests from client devices.
The script allows browsing through the file system and access to the media which is to be found.
Thanks SSDP announcer can write your own UPnP / DLNA server on any scripting language, which is able to work nginx.
UPnP clients (eg DLNA for android, VLC under Linux etc), listen to the network multicast announcements and periodically send queries themselves to receive announcements.
Announcements represent a IPv4 / IPv6 multicast UDP packets with HTTP format for content. Requests are sent directly to the announcer.
SSDPd requires specify on which interfaces to work out what URL announce and XML file describing the device.
In this work SSDPd ends. Everything else happens communication client to the server via HTTP.
Client after receiving announcements if he was interested in the type of UPnP devices on the HTTP-GET takes the XML file from the announcement of the URL, parses it, then picks up the XML files describing services.
XML files are static, attached examples in the distribution.
After parsing the XML files the client accesses the services by URL specified in XML files using HTTP, using the methods: POST, SUBSCRIBE, UNSUBSCRIBE.
In a simple case (for a minimum of the functional) processing HTTP request methods SUBSCRIBE, UNSUBSCRIBE amount to granting the 200 + a pair of additional headers this can easily cope nginx.
Source code: https://github.com/rozhuk-im/ssdpd
UPnP docs: http://www.netlab.linkpc.net/download/software/ssdpd/doc/