Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : TIdTCPClient
| Subject: | TIdTCPClient |
| Posted by: | "Carlos Matos" (mat..@comograma.pt) |
| Date: | Thu, 2 Mar 2006 12:53:28 |
I'm using a TIdTCPClient to connect to TIdTCPServer and I would like to
know if, to close the connection, my code is ok, because when I have the
Delphi debugger enabled, I allways get an error message saying:
> Project MyProj.exe raised exception class EIdClosedSocket with message
> 'Disconnected.'. Process stopped.
> Use Step or run to continue.
My code for disconnect from the server is:
> TIdTCPClient.Disconnect;
> TIdTCPClient.IOHandler.Free;
Must I call TIdTCPClient.IOHandler.Free or just call TIdTCPClient.Disconnect
?
Thanks,
Carlos