<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi <br><br></div><div class="gmail_default" style="font-size:small">i want to stop one specific RTSP client connection , so i tried to close the sockets for that connection and turn off the back ground handlers for that socket. <br></div><div class="gmail_default" style="font-size:small">i am able to stop that specific client, but because of that its affecting other client connection. following is the bunch of code i used to close them.<br><br>+void RTSPServer::stopwanstreaming(){<br><br>+       fprintf(stderr,"wan stopping by handler\n");<br>+<br>+       fprintf(stderr,"g_wan_socket= %p  g_fClientInputSocket = %p g_fClientOutputSocket=%p\n",g_wan_socket,g_fClientInputSocket,g_fClientOutputSocket);<br>+<br>+       if (g_fClientOutputSocket != g_fClientInputSocket) {<br>+               envir().taskScheduler().disableBackgroundHandling(g_fClientOutputSocket);<br>+               ::closeSocket(g_fClientOutputSocket);<br>+       }<br>+<br>+       envir().taskScheduler().disableBackgroundHandling(g_fClientInputSocket);<br>+       ::closeSocket(g_fClientInputSocket);<br>+<br>+       <br>+       wisSysInfo->wis_streamer_data.stream_usr_cnt &= 0x00FF;<br>+        fprintf(stderr,"usrcnt = %d\n",wisSysInfo->wis_streamer_data.stream_usr_cnt);<br>+<br>+       g_fClientInputSocket = g_fClientOutputSocket = -1;<br>+       wisSysInfo->wis_streamer_data.stop_stream = 0;<br>+       wisSysInfo->cloud_streaming = 0;<br>+<br>+<br>+       fprintf(stderr,"deleting wan handler : %p \n",g_wan_connection_handler);<br>+       //delete g_wan_connection_handler;<br>+<br>+       g_wan_connection_handler = NULL;<br>+       g_wan_socket = -1;<br>+<br>+}<br><br></div><div class="gmail_default" style="font-size:small">can you please help me to find out what am i missing, or better way to achieve this. ?<br><br></div><div class="gmail_default" style="font-size:small">Thank you,<br></div><div class="gmail_default" style="font-size:small"><br clear="all"></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><b><font color="#0b5394">With Warm Regards,</font></b></div><div><font color="#0b5394">Hardik Sangani</font></div><div><font color="#0b5394">VVDN Technologies Pvt Ltd</font></div><div><font color="#0b5394"><b>Cell : </b>+91 9176120633<b> | Skype : hardikjsangani</b></font></div></div></div></div></div></div></div></div>
</div>