Re: Event when data arrived or server has disconnected

Giganews Newsgroups
Subject: Re: Event when data arrived or server has disconnected
Posted by:  glup (nospam@kahn-gruppe.de)
Date: Mon, 1 Sep 2003

> The server could have a connection timeout activated, on which he
> disconnects when the connection was idle a certain amount of time. I want
to
> visualize the connection state (connected/disconnected). If I use the
> OnDisconnect event, it is not fired when the server is disconnecting, but
> when I try to send a new command. That's NOT usefull.
>
Oops...
I tried just this example and found, that OnDisconnect is NOT called.
Instead I get a Exception, that the connection is closed. Do I have to
surround all SendCmd with a try/except and call on exception my handler
"manually"?

Rgds

glup

Replies

In response to

Event when data arrived or server has disconnected posted by glup on Mon, 1 Sep 2003