tags:

views:

32

answers:

1

Does anybody know, how to check if broadcast is online or offline in Icecast2 server? Ruby preferred.

A: 

I guess you can make a TCP (HTTP) connection to specified server. Icecast server works as a regular HTTP server but data transfers are actually streams. So, all you need is to make regular Socket connection and send request (you can grab it from live http headers extension in firefox). Also, you might want to set timeout in case that server is down. And if server responds with HTTP/OK (200) code then its live.

Dan Sosedoff
The problem is in icecast so called mount points, on one server could be many broadcasts simultaneously and i need to check only one of them.
maxt3r
Yes, i know. They`re used to be paths "/channel1", "/channel2". Have you tried to make a request to the specific path ?
Dan Sosedoff
No, but i guess i should. Thanks.
maxt3r