[Live-devel] When send() failed, the return value of send() - EAGAIN

Ross Finlayson finlayson at live555.com
Thu Jan 20 23:42:51 PST 2011


>     I'm wondering, why LIVE555 project doesn't care about the return 
>value of send().

Because there's usually nothing meaningful we can do if "send()" fails.


>     I'm facing a problem these days.
>     My RTSP Server was connected via a low speed network in RTP/TCP 
>mode, and the client couldn't get any complete image.

Sorry, but if you're streaming over TCP, and "send()"s are failing, 
then it must be because your OS buffers are overflowing, because your 
stream's bitrate exceeding the capacity of your network.  In that 
case, you lose.  End of story.  Don't stream over TCP.  Stream over 
UDP instead.  Yes, you'll still lose data, but at least the data loss 
will be on RTP packet boundaries.


>     I check the return value of send():
>         on Linux : "errno" will be 11 -> EAGAIN
>         on Windows : "GetLastError()" will be 10035 -> WSAEWOULDBLOCK
>     Ignore the error, and try to send() again, it works.
>
>     Is there any reason why does LIVE555 not check the return value of send()?

Because, as I said before, there's nothing meaningful we could do. 
It sounds like you're talking about trying to implement some sort of 
'reliable retransmission' protocol on top of TCP.  Sorry, but that's 
completely brain damaged.  TCP is already a reliable protocol.  If 
it's failing, then your network must be inadequate for your stream's 
bitrate.  You'll need a slower stream, or a faster network.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20110120/b44fb8ee/attachment.html>


More information about the live-devel mailing list