Hello Markus, Why do you use one thread per socket ? TSWocket is event driven so you can connect to 500 servers if you want within same thread.
For polling messages, if you .mulithread:=true then the TWSocket will create its own message queue. HM> Hello, HM> to the socket hanging on close. HM> There are different threads involved. HM> The communication dll has one thread which only polls messages. HM> That one shouldn't be the problem. HM> The dll using that communication dll has one thread per socket HM> (max. at most 10). Freing the socket is requested by this dll HM> when it's execute method terminates. HM> So I don't think I need threadattach in the communication HM> dll. Shared Mem is not used because so Strings are used. All params HM> passed between these dlls are either numbers or pchars (which get copied to HM> strings internally). HM> So whare's the problem with my approach? Only TWSocket.close seems to hang. HM> I will test a bit more now, maybe I find a solution but I don't know HM> what causes the hang. But normally the sequence HM> TWSocket.close; HM> TWSocket.Free; HM> is okay to terminate and release it? HM> Greetings HM> Markus -- 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