O.P. Port Listening
Hey guys, I'm needing a little bit of help with a minor script. Well, maybe a lot of help, because I honestly dont have a clue, but maybe I can find out if this is at least possible.
I have an xbox, which runs xbmc on my network, and I'm looking to detect a few of the functions froom this. The xbox runs a broadcast function in the background, which sends a UDP datagram whenever an error occurs (among other things).
Basically, I'm looking for a way to listen for this broadcast, and take the information from it, to store in a variable.
I've looked on the xbmc website, and found this information about the function.
The Broadcast facility uses the UDP broadcast protocol with a default port setting of 8278.
XBMC broadcasts on the IP address 255.255.255.255 which is the limited broadcast address.
The actual broadcasts are delimited by <b></b> and may consist of a numerical or textual description of the event (depening on the event)
I've used a small util which lets me see these on Windows, and one of the messages appears as "<b>OnPlayBackStarted;1</b>"
I know how to remove the <b>s etc, but I dont have a clue about the actual listening, or reading information.
Can anyone give me a clue as to whether this is possible, and how it would be done?
Thanks
Stefan Leroux
|