<br><div class="gmail_quote"><div><div class="h5"><br><div class="gmail_quote"><div class="gmail_quote">Dear Ross,<br><br>I am trying to use live555MediaServer.cpp as a server , I was successfully compiled the code in VS2008. I use a main form to present the live555MediaServer, there has a button which triggered the below functions:<br>




<br>public:<br>        void startServer(){<br><br>            TaskScheduler* scheduler = BasicTaskScheduler::createNew();<br>            UsageEnvironment* env = BasicUsageEnvironment::createNew(*scheduler);<br>            UserAuthenticationDatabase* authDB = NULL;<br>




            RTSPServer* rtspServer;<br>            portNumBits rtspServerPortNum = 554;<br>            rtspServer = DynamicRTSPServer::createNew(*env, rtspServerPortNum, authDB);<br>            if (rtspServer == NULL) {<br>




                rtspServerPortNum = 8554;<br>                rtspServer = DynamicRTSPServer::createNew(*env, rtspServerPortNum, authDB);<br>            }<br>            <br>            env-&gt;taskScheduler().doEventLoop();<br>




            <br>        }<br><br>When the form is running, user click on the button in order to start the server, it hangs. My question is, Is that a way to prevent the form being hang while the server is running ?<br><br>




Thanks in advance,<br>Steven Choong<br><br>
<br></div><br>
</div><br>
</div></div></div><br>