[twsocket] TWSocket...
Hi, Thanks, that is what I thought. I wanted to have one TWSocket listen for a connection from X and another listen for a connection from Y. But, I know what I need to do. Question 2: Can I call Connect from inside the OnSessionClosed event without trouble? Ciao, Mark -- 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
Re: [twsocket] TWSocket...
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