TAstaClientSocket.OnDisconnect
Applies to
TAstaClientSocket
Declaration
property
OnDisconnect:
TSocketNotifyEvent;
Description
Occurs just before a client socket closes the connection to a server socket. See the Delphi help file
for TClientSocket OnDisconnect.
If you do NOT code the OnDisconnect Event, an exception will be raised so it is recommended that you code the OnDisconnectEvent even with just a comment as ASTA will raise an exception if the event is not assigned.
Note:You cannot set the AstaClientSocket.Active to true in the OnDisconnect even but you must use a timer so that the setting of the Active property occurs after the event has fired. Use the TimerReconnect method from within the OnDisconnect event if you want to trigger a reconnect.