<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'>When connecting to a server that doesn't respond, or is just slow, the timeout appears to be around 25s, i.e. the time before the response handler is called.<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:12.0pt;font-family:"Courier New"'>Is there a way to decrease this time?<o:p></o:p></span></b></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'>Why? Well, in the project I'm working on there are lots of changing cameras that are on a 10s cycle, so there is no need to try for more than 10s. While I assume it should be ok to call shutdown() while the client is still trying (and stop the event loop etc), it would be beneficial to be able to wait for the response handler to return.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'>I've seen some lingering connections in rare cases, which most likely is due to my code, but it would nonetheless be nicer to always wait for the response handler. These yet unexplained lingering connections happens for maybe 1 stream out of 20000.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'>When looking in the code the only somewhat related variable or function I see is the sessionTimeoutParameter which doesn't seem to have anything with the connection timeout to do.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'>Two testRTSPClient examples below. In the first I just connect to an arbitrary URL where there is no server that responds, and it takes about 25s before the response handler is called. In the second example our Cisco VSM is bogged down and it takes 30s for it to respond.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#0070C0'>e:\projects\live\Release>testRTSPClient.exe rtsp://ibm.com/moo<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#0070C0'>!!! fInputSocketNum -1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#0070C0'>Opening connection to 129.42.38.1, port 554...<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#0070C0'>!!! connectResult 0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#0070C0'>...Connection to server failed: Unknown error<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#0070C0'>[URL:"rtsp://ibm.com/moo"]: Failed to get a SDP description: Connection to server failed: Unknown error<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#0070C0'>[URL:"rtsp://ibm.com/moo"]: Closing the stream.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>e:\projects\live\Release>testRTSPClient.exe rtsp://192.168.1.103/live/TVF-16<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>!!! fInputSocketNum -1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>Opening connection to 192.168.1.103, port 554...<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>!!! connectResult 0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>...remote connection opened<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>!!! fInputSocketNum 124<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>Sending request: DESCRIBE rtsp://192.168.1.103/live/TVF-16 RTSP/1.0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>CSeq: 2<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>User-Agent: testRTSPClient.exe (LIVE555 Streaming Media v2012.09.13)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>Accept: application/sdp<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>Received 61 new bytes of response data.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>Received a complete DESCRIBE response:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>RTSP/1.0 500 Server Error (Unable to open proxy)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>CSeq: 2<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>[URL:"rtsp://192.168.1.103/live/TVF-16"]: Failed to get a SDP description: 500 Server Error (Unable to open proxy)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'>[URL:"rtsp://192.168.1.103/live/TVF-16"]: Closing the stream.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#76923C'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'>/Claes<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Courier New"'><o:p> </o:p></span></p></div></body></html>