Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Apr : Handle disconnection in TIdCmdTCPClient

www.cryer.info
Managed Newsgroup Archive

Handle disconnection in TIdCmdTCPClient

Subject:Handle disconnection in TIdCmdTCPClient
Posted by:"David" (focus..@yeah.net)
Date:Mon, 23 Apr 2007 17:00:11

When use TidCmdTCPClient to connect to a server, after connected, but the
line lost (for example, the switch is power off), how to know it in
TIdCmdTCPClient?

In the F9-run mode, the program will raise an exception after the line lost
(I guess it is because of the Listen Thread in TIdCmdTCPClient). But in
single run mode, it seems don't know the line is lost, or raise a
"Connection reset by peer" error box, how to hide this box? I need to handle
it in my own program.

Thanks

David

Replies:

www.cryer.info
Managed Newsgroup Archive