Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Re: OnDisconnected event
| Subject: | Re: OnDisconnected event |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Thu, 14 Dec 2006 10:46:36 |
"Arnau Font" <afont@nospam_really_ipssoft.com> wrote in message
news:458170b3$1@newsgroups.borland.com...
> I've assigned a event to the OnDisconnected event to know when do
> I lose the connection with the server.
That will not work. Indy is not an event-driven library. The
TIdTCPClient.OnDisconnect event is only triggered when Disconnect() is
explicitally called.
> An EIdClosedGracefully exception raises, but the event doesn't execute.
As it should be. That is not Indy is designed to work. The event is not
supposed to be triggered in that scenerio.
> Looks like it only executes if I call Socket.Disconnect. Is this the
> normal behaviour?
Yes.
Gambit