bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tcpstream::open thrown exceptions


From: Federico Montesino Pouzols
Subject: Re: tcpstream::open thrown exceptions
Date: Thu, 15 May 2003 13:35:27 +0200
User-agent: Mutt/1.5.4i

        if tcpserver inherits publicly from tcpstream, you can use the
isConnected() call inherited from Socket to know if the socket is
connected. 

On Thu, Apr 24, 2003 at 05:36:32PM +0200, Liviu wrote:
> Hello,
> 
> I'am trying to write a simple client that connects to a telnet server
> using the tcpstream class.
> My code goes like this:
> 
> tcpserver tcp;
> try {
>     tcp.open("127.0.0.1:23");
> }
> catch(Socket* socket)
> {
>     cerr << "An exception was thrown." << endl;
> }
> 
> If the telnet server is running everything goes ok.
> It the telnet server is NOT RUNNING (so the open should fail) the open
> function doesn't throw any exception.
> 
> My question is: How do I know if my client connected or not to the
> server ???
> 
> 
>     
> 
> 
>   
> 
> -- 
> Best regards,
>  Liviu                          mailto:address@hidden
> 
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]