Dear Live555 Developers, I have discovered a bug whereby UDP packets are getting lost using live555MediaServer. The issue is that the socket used for sending the packets is set to non-blocking mode. Occasionally when the application sends a lot of data in a short amount of time the sendto function within writeSocket in GroupsockHelper.cpp returns -1, and WSAGetLastError reports WSAEWOULDBLOCK. Unfortunately the packet is then discarded and no attempts to try and send it again later are made.
I was able to fix this by putting the socket into blocking mode, thus if the buffers are full it will wait until there is space before returning which should be a very short amount of time anyway. I have tested the fix under both windows and linux and in both cases it reduced my packet loss to 0 measured on the client side. I have attached a patch, please let me know if there could be any reason it's not a good idea to make the sending socket blocking. The alternative would be to keep the socket in non-blocking mode but make sure that the packet is re-queued for sending upon receiving the WSAEWOULDBLOCK error, that seems like a more involved change though. Regards, Martin Sherburn. ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________
0001-Fix-for-packets-getting-lost-when-OS-send-buffer-que.patch
Description: 0001-Fix-for-packets-getting-lost-when-OS-send-buffer-que.patch
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel