zayin wrote:
> Question 2: Can I call Connect from inside the OnSessionClosed event
> without trouble?
No, that makes trouble.
You have to post a custom message and reconnect from its message handler.
Something like this:
const
WM_RECONNECT = WM_USER + 1
protected
procedure WmReconnect(var Msg: TMessage); message WM_RECONNECT;
implementation
procedure TMainForm.WmReconnect(var Msg: TMessage);
begin
reassign all properties and events;
call connect
end;
In OnSessionClosed call PostMessage(MainForm.Handle, WM_RECONNECT, 0, 0);
--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be