I have a Roku device on my network and I want it to be detectable with the program. The official documentation The official Roku documentation reports:
There is a standard SSDP multicast address and port (239.255.255.250:1900), which is used for communication over a local network. Roku responds to M-SEARCH requests for this IP address and port.
To request the roku ip address, your program can send the following request using the http protocol to port 239.255.255.250 1900:
They give an example of using netcat, and they say that wirehark can be used to find the result. They also say:
An external control protocol allows you to control your Roku through a network. The external control service is discovered through SSDP (Simple Service Discovery Protocol). The service is a simple RESTful API that programs can access in almost any programming environment.
I have a java program that manages my Roku with its IP address, and I would like to implement a function that detects it on the network using this SSDP.
How to send an M-SEARCH request using java? I have absolutely no concept how to do this. Is it like a request to receive / send? If anyone could point me in the right direction, I would be very grateful!
source
share