Its worse... I also noticed that
TWSocketClient.TriggerSessionClosed() is triggered by
the client, but the message posted is never received
by the server.  This happens even then the client
drops the connection.  So, for some reason, the
clients are never destroyed.

   I'm sure that its something to do with my code,
but can anybody offer some suggestions as to what may
cause this behaviour?


>------- Original Message -------
>Sent    : 10/17/2007 2:06:48 PM
>To      : twsocket@elists.org
>Cc      : 
>Subject : RE: [twsocket] TWSocketServer
Client.Shutdown(1) does not destroy it
   I just started noticing this behaviour today, and
I seem to recall it working differently:  When
handling the OnClientDataAvailable event, if I
determine that the client needs to be disconnected, I
call (Sender As TMyClient).Shutdown(1).  The
connection is dropped fine, but the client object is
never freed until the server shuts down completely. 
Here's a sample of my code:

Procedure TMyServer.ClientDataAvailable(Sender:
TObject; Error: Word);
  With (Sender As TMyClient) Do Begin
    If (SomethingBadHappened) Then Begin

I call Shutdown(1) so that the connection is dropped
gracefully and the error response is received by the
client.  I don't recall changing this recently, so
I'm confused as to why it would have been destroying
the client before and not now (I may have changed
some of the default properties, though I don't recall
anything pertinent to this issue).  Perhaps there's
an even better way?

    Thanks for the help,

To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to