Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Sep : Detecting Client disconnect

www.cryer.info
Managed Newsgroup Archive

Detecting Client disconnect

Subject:Detecting Client disconnect
Posted by:"Roberto Meneghini" (rmeneghi..@separationsystems.com)
Date:Mon, 25 Sep 2006 16:45:53

Hello,

I'm writing a simple client/server application using INDY10's IdTCPServer
and IdTCPClient for Delphi 2006 .NET. Everything works well (connect,
disconnect, sending data back and forward).
Is there a way for the server to know that the client has lost connection?
Like the network cable was unplug or the computer crashed. I have tried
using "Connection.IOHandler.Connected" and
"Connection.CheckForGracefulDisconnect" but it always return positive even
if the client computer is no longer connected.

Any suggestions?

Thanks,

Roberto

Replies:

www.cryer.info
Managed Newsgroup Archive