[Live-devel] Live555 send packets over TCP issue on Windows

Ross Finlayson finlayson at live555.com
Thu May 25 08:36:34 PDT 2017


The “EAGAIN"s occur when the sending OS's TCP buffer is full - which occurs if the stream's bitrate exceeds (at least temporarily) the capacity of the TCP connection.  (When this happens, the only solution is to discard outgoing data.  Our code does so by ensuring that if/when data gets discarded, the discarded data will be a complete RTP (or RTCP) packet - equivalent to the loss of a packet if you were streaming over UDP.)

It’s important for everyone to understand that streaming over TCP is something that should be done *only* if you are behind a firewall that blocks UDP packets.  Streaming over TCP is not a 'magic wand' that will avoid all data loss, no matter what the bitrate of your stream and the capacity of your network.  Unless there is a TCP-blocking firewall between your server and client, you should do regular RTP/RTCP-over-UDP streaming instead.

You note, however, that you are seeing this issue only on Windows - not on MacOS.  This suggests that - in your case - the problem is that your stream’s bitrate is exceeding the capacity of your TCP connection only temporarily, and that increased buffering for TCP (inside your OS kernel) should overcome this.

I.e., your solution is to (somehow) tune your Windows OS kernel to increase the memory buffering that it uses for TCP.  This is something that you would (somehow) do specifically with Windows.  It should not, I think, require any changes to the way that you build the LIVE555 code (and certainly not any changes to the LIVE555 code itself).


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list