How to send M-SEARCH from Javascript / Browser
Is it possible to send SSDP M-SEARCH from javascript in browser? The protocol is based on UDP and the message I would like to send from Javascript should look like this:
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: seconds to delay response
ST: search target
USER-AGENT: OS/version UPnP/1.1 product/version
Someone asked a similar question , a more general way to send UDP packets from the browser. The answer doesn't really show any code samples.
I understand WebRTC allows things like DataChannels , but that's not what I'm looking for. I am literally looking for a way to send UDP packets from javascript running in the browser like the example above.
+3
source to share
1 answer