[Icecast-dev] libshout : how to detect network connection lost

Randy McAnally rsm at fast-serv.com
Thu May 22 12:08:07 PDT 2008


I noticed the same problem in the Perl wrappers since many years ago.  I 
ended up wrapping the libshout portion of the perl code in an eval/alarm to 
detect the hang and restart the libshout thread as needed.

-- 
Randy
Fast Serv Networks, LLC


> Message: 1
> Date: Thu, 22 May 2008 10:14:50 +0200
> From: "tech at viewsurf" <tech at viewsurf.com>
> Subject: [Icecast-dev] libshout : how to detect network connection
> 	lost
> To: Icecast-dev at xiph.org
> Message-ID: <48352B7A.9010208 at viewsurf.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> 
> Hello everybody,
> 
> I'm using a software of my own that uses libshout to send an ogg 
> stream to my icecast server.
> 
> While transmitting the stream, if i unplug the network cable or stop 
> the network interface, the soft hangs on shout_send. There seems to 
> be no timeout (or, at least, i've let it run for 10mins without 
> seeing any timeout).
> 
> Is there a way to detect such events using libshout or do i have to 
> put a timeout on the send function?
> 
> here is the piece of code for the send function :
> 
> shout_sync(m_shout);
> int ret = shout_send(m_shout, (unsigned char*)buf, buflen);
> if(ret != SHOUTERR_SUCCESS) {
> 	Logger::log("Shout::send shout send error\n");
> 	return false;
> }
> return true;
> 
> Thanks for any advice
> 
> Florian
> 
> ------------------------------
> 
> _______________________________________________
> Icecast-dev mailing list
> Icecast-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast-dev
> 
> End of Icecast-dev Digest, Vol 47, Issue 2
> ******************************************
------- End of Original Message -------



More information about the Icecast-dev mailing list