[Live-devel] Increasing OutPacketBuffer::maxSize results in sendto() returning WSAEWOULDBLOCK

Ross Finlayson finlayson at live555.com
Thu Jan 16 12:40:21 PST 2020


The reason that you’re seeing lost packets has nothing to do with "OutPacketBuffer::maxSize”, nor with “sendto()”.  It’s simply because the streaming is done over UDP, a ‘best efforts' datagram protocol, in which data delivery (unlike in TCP) is not guaranteed.

That’s simply how real-time (RTP) streaming works.  Time-sensitive data is sent via an unreliable datagram protocol.  Packets can get lost.  If a packet gets lost, then it often would not make sense to try to retransmit it, because the data is time-sensitive.  (By the time the receiver (e.g., media player) ended up getting it, it would no longer be of any use; the media player will have already moved on to a later frame.)  (For very low-latency connections (e.g., over a LAN), there are feedback-based retransmission mechanisms available for RTP; however, we do not implement these.)

This confuses some people who are relatively new to the Internet, because most people's exposure to the Internet these days is solely via the World-Wide Web (HTTP), in which data is sent using a reliable protocol (such as TCP).  But datagram-based streaming is different.

If data loss is a ‘deal breaker’ for you, then you should not be using RTP, nor our software.  Instead, transfer your stream over TCP, using something like “nc”, or “scp”.


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




More information about the live-devel mailing list