Hello, <div><br></div><div>I just recently started developing some code to implement a simple RTSP client. </div><div><br></div><div>I have been using the new RTSPClient implementation. (the one with the non blocking sockets)</div>
<div><br></div><div>Below is an excerpt from my code:</div><div><br></div><div><div><br></div><div>  <b>rtspclient = RTSPClient::createNew(*env,link,verbosity_level,app_name,tunnel);</b></div><div><b><br></b></div><div><b>  *env &lt;&lt; &quot;created rtsp client\n&quot;;</b></div>
<div><b><br></b></div><div><b>  RTSPClient::responseHandler *fun = &amp;printOptions; //printOptions prints the options response to stdout</b></div><div><b>  cseq = rtspclient-&gt;sendOptionsCommand(fun,NULL);</b></div><div>
<b>  *env &lt;&lt; &quot;Options Cseq = &quot;&lt;&lt; cseq &lt;&lt; &quot;\n&quot;;</b></div><div><b><br></b></div><div><b>  fun = &amp;printDescribe;//printDescribe prints the sdp description to stdout</b></div><div><b>  cseq = rtspclient-&gt;sendDescribeCommand(fun,NULL);</b></div>
<div><b>  *env &lt;&lt; &quot;Describe Cseq = &quot; &lt;&lt; cseq &lt;&lt; &quot;\n&quot;;</b></div><div><b><br></b></div><div><b>   env-&gt;taskScheduler().doEventLoop(); </b></div><div><br></div><div><br></div><div>Now, I know that the last statement effectively terminates the current thread of execution. However, without this statement, the printOptions and printDescribe functions dont output anything. This would have probably worked fine without the last statement if blocking sockets were used. </div>
<div><br></div><div>Is there a way for the printOptions/Describe functions to be called without using the env-&gt;taskScheduler().doEventLoop() statement?</div><div><br></div><div>I tried looking through the UsageEnvironment and TaskScheduler classes, but I&#39;m not as comfortable with C++ as I am with C, so I would really appreciate any help/suggestions I could get. </div>
<div><br></div><div>Thanks,</div><div>Rachit</div></div>