What is SSDP?
SSDP (Simple Service Discovery Protocol) is the discovery layer of UPnP. It lets devices announce themselves and respond to searches on a local network without any pre-configuration — no static IPs, no mDNS, no DNS-SD. SSDP runs over UDP multicast. Devices that want to be found join a well-known multicast group address (239.255.255.250) and listen on port 1900. Clients looking for devices send an M-SEARCH request to that same address and port, and any matching server responds directly to the client.
How this server implements SSDP
The server creates a UDP socket and joins the multicast group at startup:The M-SEARCH / response flow
A DLNA client broadcasts an M-SEARCH request over UDP:Response headers explained
| Header | Value | Purpose |
|---|---|---|
CACHE-CONTROL | no-store | Instructs clients not to cache this response; they must re-discover on each search |
LOCATION | http://[IP]:8080/description.xml | URL where the client can fetch the full UPnP device description |
SERVER | node/[version] UPnP/1.1 | Identifies the server software and UPnP version |
ST | urn:schemas-upnp-org:device:MediaServer:1 | The device type this server claims to be |
USN | uuid:[uuid]::urn:schemas-upnp-org:device:MediaServer:1 | A unique identifier for this specific server instance |
uuid value is generated once at startup and remains stable for the lifetime of the process.
CACHE-CONTROL and re-discovery
SettingCACHE-CONTROL: no-store means clients will not cache the discovery response. Every time a client performs an M-SEARCH, it must receive a fresh response from the server. This keeps the server’s presence on the network tied to the process actually running — if the server stops, clients will not find a stale cached entry.
Port 1900 is a privileged port on some operating systems. If the server fails to bind on startup, you may need to run it with elevated permissions or configure your firewall to allow UDP traffic on port 1900.
Further reading
- DLNA and UPnP overview — the full protocol stack
- SOAP and the ContentDirectory service — what clients do after discovery