> > I think the problem is that in TCustomWSocket.InternalClose the message > > pump is called > > I think you right about that. As I recall CloseDelayed was introduced if > it was needed to Close from in one of the events. Most likely that was > the reason.
So should I call CloseDelayed() or Shutdown(1) from the event? I want to make sure that the client receives the data last sent from the server right before closing. For example: // OnDataAvailable event handler Begin If (NeedToShutdownConnection) Then Begin Client.SendLine('-ERR Closing connection.'); Client.Shutdown(1); // Or CloseDelayed() ...? End; End; Thanks again to all of you, -dZ. -- 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