The existing code is correct.  The reason for this code is to ensure that 
sending a (RTP or RTCP) packet over a TCP connection - which involves two 
separate writes: one for a header; another for the packet data itself - occurs 
as an atomic operation.  I.e., we want either neither of the writes to succeed, 
or both of them to succeed.  If the write of the header were to succeed, but 
the subsequent write of the packet data were to fail, then you'd end up with 
invalid data being sent (and thus received) over the TCP connection.

Your write operation is blocking because your stream is - at least temporarily 
- exceeding the capacity of your network.  To avoid this, you need a slower 
stream, or a faster network.

A reminder - yet again - that RTP/RTCP-over-TCP should be used *only* if you 
have a firewall that is blocking UDP packets.

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

_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to