Éric Fleming Bonilha wrote: > Hello, > > I´m writing a multi-threaded client application > > I read the ICS code and there is written that to make a real multi- > threaded application we should do ThreadAttach and use the > messageloop procedure on the execute method of the working thread. > I´m doing this, but, how do I stop this thread? How can I exit from > the loop to free the thread? There is written that the message > WM_QUIT should be sent, but to what handler?
First of all, you don't need multi-threading by default for the socket I/O. ICS uses asynchron winsock API. If you want to process lengthy tasks the you should move that stuff in a workerthread and send the result when the thread finished. > There is written that the message > WM_QUIT should be sent, but to what handler? The message loop stopps, means function GetMessage() returns FALSE when it receives a WM_QUIT message. If yuo use TWSocket.MessageLoop you need to send it to the window handle (property Handle) of TWsocket (or property CtrlSocket). --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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