Does anybody know, how to check if broadcast is online or offline in Ice开发者_如何学Pythoncast2 server? Ruby preferred.
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.
精彩评论