EDIT: Based on the Firefox operating system.
Looking around this topic and based on Andre Fiedlerβs answer, I found that the libraries he hosted are on a UDPSocket from MDN.
On the main page you can see an example of detection:
var SSDP_PORT = 1900; var SSDP_ADDRESS = "239.255.255.250"; var SSDP_DISCOVER_MX = 2; var SEARCH_TARGET = "urn:schemas-upnp-org:service:ContentDirectory:1"; var SSDP_DISCOVER_PACKET = "M-SEARCH * HTTP/1.1\r\n" + "HOST: " + SSDP_ADDRESS + ":" + SSDP_PORT + "\r\n" + "MAN: \"ssdp:discover\"\r\n" + "MX: " + SSDP_DISCOVER_MX + "\r\n" + "ST: " + SEARCH_TARGET + "\r\n" + "\r\n"; var searchSocket = new UDPSocket({ loopback: true }); searchSocket.joinMulticastGroup(SSDP_ADDRESS); searchSocket.onmessage = function (e) { var msg = String.fromCharCode.apply(null, new Uint8Array(e.data)); console.log(msg); }; searchSocket.opened.then(function() { searchSocket.send(SSDP_DISCOVER_PACKET, SSDP_ADDRESS, SSDP_PORT); setTimeout(function () { searchSocket.close(); }, SSDP_DISCOVER_MX * 1000); });
source share