--- Begin Message ---
Hallo everybody!

I discovered strange disconnections when I used streaming over TCP.
I recompiled live555 library with -DDEBUG and -DDEBUG_SEND and saw some 
diagnostic:

sendRTPorRTCPPacketOverTCP: 1448 bytes over channel 0 (socket 7)
sendDataOverTCP: resending 795-byte send (blocking)
sendDataOverTCP: blocking send() failed (delivering -1 bytes out of 795); 
closing socket 7
SocketDescriptor(socket 7)::deregisterRTPInterface(channel 255)
sendRTPorRTCPPacketOverTCP: failed! (errno 11)
RTSPClientConnection[0x8e80978]::handleRequestBytes() read 4 new bytes:$
RTSPClientConnection[0x8e80978]::handleRequestBytes() read 52 new bytes:?
schedule(5.170436->1411036332.468457)
RTSPClientConnection[0x8e7baf0]::handleRequestBytes() read 212 new 
bytes:GET_PARAMETER 
rtsp://192.168.0.35:8554/archive?record=541697a20c8ac43f&sessionId=35/ RTSP/1.0
CSeq: 21349
User-Agent: LibVLC/2.2.0-pre4-20140908-0202 (LIVE555 Streaming Media 
v2014.07.25)
Session: CED66A9C

So, errno 11 - it's EAGAIN, and that's very strange for socket in blocking mode.

However, I found topic: 
stackoverflow.com/questions/735249/blocking-socket-returns-eagain
And I understood that is quite possible.

I tried to fix the problem by this way:

-      sendResult = send(socketNum, (char const*)(&data[numBytesSentSoFar]), 
numBytesRemainingToSend, 0/*flags*/);
+      
+      do {
+           sendResult = send(socketNum, (char 
const*)(&data[numBytesSentSoFar]), numBytesRemainingToSend, 0/*flags*/);
+      } while(sendResult == -1 && envir().getErrno() == EAGAIN);


And it works now!

Could you possibly investigate this problem?

Thank you for you work!

Best regards,
Sergey.

Attachment: sendDataOverTCP.patch
Description: Binary data


--- End Message ---
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to