<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">The problem is user can remove the cable of TCP stream laptop and it stop another client steaming UDP.</span></div></div></div></blockquote><div><br></div>Too bad!  As I said before, the write to TCP *has to* be atomic.  If the write partly succeeds (i.e., if the initial, non-blocking call to "send()" returned a data count less than that provided (but >0)), then the remaining write *has to* succeed - otherwise the receiver will get inconsistent data; something that it doesn't expect to see over a TCP connection.  That's why the blocking write is done.  (Once again, this blocking write is done *only* in rare circumstances: when the initial, non-blocking write of packet data succeeded in writing only part of the data.  )</div><div><br></div><div>Unfortunately there's no way for the code (or the OS, probably) to distinguish between the case where the write would block for only a short period of time (due to temporary network congestion), or indefinitely (e.g., due to someone unplugging a cable).</div><div><br></div><div>The only way to prevent this is to reconfigure your server so that it does not support requests to stream RTP/RTCP-over-TCP.</div><div><br></div><div>I have just released a new version - 2014.04.23 - that adds a new function "RTSPServer::disableStreamingRTPOverTCP()" that you can call on your newly-created "RTSPServer" object to reject client requests to stream RTP/RTCP-over-TCP.</div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>