bug-commoncpp
[Top][All Lists]
Advanced

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

Re: Detecting dead connection with TCPSession?


From: Massimo Balestri
Subject: Re: Detecting dead connection with TCPSession?
Date: Thu, 04 Apr 2002 09:30:15 +0200

I wrote a similar application and found the same problem.
Does anybody know how to handle this?

Best regards,
Massimo.

At 14.17 01/04/2002 -0500, Austen, Tyler wrote:
Hi,

I'm writing a simple socket server that accepts connections on a socket by creating TCPSessions.  Currently, my server will accept a connection from a client, but if the client "dies", or even closes down gracefully, my server's TCPSession is none the wiser.

I've got the server's TCPSession checking the following conditions periodically (i.e. every 1second):

  - isActive()
  - isConnected()
  - tcp()->good()
  - getErrorNumber() == 0

None of these checks evaluate to false...  I was expecting isConnected() to tell me that the connection was bad, but it didn't.

Any ideas what I should do so that my server's TCPSession can know when the client has gone away?

Thanks a million,

Tyler


_______________________________________________
Bug-commoncpp mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-commoncpp

----------------------------
Massimo Balestri
TELECOM ITALIA LAB
Multimedia Division             
Via G. Reiss Romoli, 274
I 10148 TORINO (I)
Tel: + 39 011 228 6176
GSM: + 39 335 132 6578
Fax: + 39 011 228 6299
http://www.telecomitalialab.com


reply via email to

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