<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I believe the
ProxyServerMediaSession.cpp has an example of resetting the client
connected to a server on result codes returned via OPTION
command. See the continueAfterLivenessCommand() and
continueAfterOPTIONS(). <br>
<br>
Craig<br>
<br>
On 12/09/2013 08:07 AM, Adrian Kovacs wrote:<br>
</div>
<blockquote
cite="mid:C9AAF036A53AE84D8BF086502C885060548D0215@NIT-VS01.noldusbv.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style id="owaParaStyle">P {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
</style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<p>Hi,</p>
<p> </p>
<p>I would like to handle the event, when the connection to RTSP
server lost and the connection is restored. I can detect, when
the connection is lost with sending a command to RSTP server
and check the response result code.</p>
<p> </p>
<font size="2" color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas">
<p>RTSPClient* pClient;</p>
</font></font></font>
<p><font size="2" color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas">pClient</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">-></font></font><font
size="2" color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas">sendOptionsCommand</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">(</font></font><font
size="2" color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas">CheckResponse</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">,
</font></font><font size="2" color="#010001" face="Consolas"><font
size="2" color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas">NULL</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">);</font></font></p>
<p> </p>
<font size="2" face="Consolas"><font size="2" face="Consolas"><font
size="2" color="#0000ff" face="Consolas"><font size="2"
color="#0000ff" face="Consolas"><font size="2"
color="#0000ff" face="Consolas">
</font></font></font>
<p><font size="2" color="#0000ff" face="Consolas"><font
size="2" color="#0000ff" face="Consolas"><font
size="2" color="#0000ff" face="Consolas">void</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">
</font></font><font size="2" color="#010001"
face="Consolas"><font size="2" color="#010001"
face="Consolas"><font size="2" color="#010001"
face="Consolas">CheckResponse</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">(</font></font><font
size="2" color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas"><font size="2"
color="#010001" face="Consolas">RTSPClient</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">*
</font></font><font size="2" color="#010001"
face="Consolas"><font size="2" color="#010001"
face="Consolas"><font size="2" color="#010001"
face="Consolas">pRTSPClient</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">,
</font></font><font size="2" color="#0000ff"
face="Consolas"><font size="2" color="#0000ff"
face="Consolas"><font size="2" color="#0000ff"
face="Consolas">int</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">
</font></font><font size="2" color="#010001"
face="Consolas"><font size="2" color="#010001"
face="Consolas"><font size="2" color="#010001"
face="Consolas">resultCode</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">,
</font></font><font size="2" color="#0000ff"
face="Consolas"><font size="2" color="#0000ff"
face="Consolas"><font size="2" color="#0000ff"
face="Consolas">char</font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">*
</font></font><font size="2" color="#008000"
face="Consolas"><font size="2" color="#008000"
face="Consolas"><font size="2" color="#008000"
face="Consolas"><font size="2" color="#010001"
face="Consolas"><font size="2" color="#010001"
face="Consolas"><font size="2" color="#010001"
face="Consolas">resString</font></font></font></font></font></font><font
size="2" face="Consolas"><font size="2" face="Consolas">)</font></font></p>
<p><font size="2" face="Consolas"><font size="2"
face="Consolas">{</font></font></p>
<p> if (resultCode < 0)</p>
<p> {</p>
<p> //connection lost</p>
<p> }</p>
<p><font size="2" face="Consolas"><font size="2"
face="Consolas">}</font></font></p>
<p> </p>
<p><font size="2" face="Consolas"><font size="2"
face="Consolas"><font face="Tahoma">I can also detect,
when the connection restored, when the result code
again becomes 0. The problem is that I don't get
frames anymore after connection restored. I debugged
why this happens, and I noticed, that in
BasicTaskScheduler::SingleStep (line 138) the socket
is not readable.</font></font></font></p>
<p> </p>
<p><font size="2" face="Consolas"><font size="2"
face="Consolas"><font face="Tahoma">The question is
that can I somehow get frames again with the active
event loop, or should I clear everything and start a
new event loop after reconnection?</font></font></font></p>
<p> </p>
<p><font size="2" face="Consolas"><font size="2"
face="Consolas"><font face="Tahoma">Adrian</font></font></font></p>
<font size="2" face="Consolas"><font size="2"
face="Consolas">
</font></font></font></font></div>
</blockquote>
<br>
</body>
</html>