[Live-devel] How to know if connection established?
Ross Finlayson
finlayson at live555.com
Fri Jul 27 02:10:02 PDT 2012
> I able to make MFC GUI application and able to solve all the issues. The only issue i have (due to lack of my knowledge of your library) that how I find out if the connection is established correctly or not. What I mean that if the customer add wrong IP Address, how do we find out the connection successfully created or not. I tried with testRTSP program, where doEventLoop loop runs once and program exits. But my program is a multithreaded application, where I am receiving video on one thread and customer can add IP Address in GUI thread. So, I want to give notification if the connection is not created successfully so that customers can correct the IP Address. Also, is there event fires when we lost connection after the connection is already established?
Your question is confusing, but I'm guessing that you're referring to using our software as a RTSP client.
Note that - with our "RTSPClient" class - the RTSP (TCP) connection is not attempted until the first time that a RTSP command is sent. So, to test whether the connection gets established OK, just (try to) send a RTSP "OPTIONS" command, by calling
RTSPClient::sendOptionsCommand( ... )
with a 'response handler' function as parameter. The "resultCode" value in the resulting handler function call will tell you whether or not the command succeeded.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120727/680a5540/attachment.html>
More information about the live-devel
mailing list