[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detecting connection end
From: |
rjg |
Subject: |
Re: Detecting connection end |
Date: |
Fri, 22 Oct 2004 08:43:15 +0100 (WEST) |
I'm not using TCPSession or TCPStream, but with other Common C++ socket classes
(like SocketService, SocketPort), if you get true from isPending(pendingInput),
and no data is available to read, it means that the connection was
closed/broken...
Hope it helps.
R.
> Hello!
>
> I try to write a simple server that accepts connections from clients and
> receives data until the other end closes the connection. I tried to use
> TCPSession and SimpleTCPStream with loops to receive the data. But all
> methods that should change their return values with an connection end
> (isConnected(), isActive(), ...) always indicate correct connections and I do
> not know how to exit from the receiving loop. In short:
> How do I detect closed connections?
>
> Greetings, René
>
> ________________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193
>
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-commoncpp
>