Humm, Markus wrote: > Now I tried to attach the socket to the "new" thread just before calling > shutdown. > I got the exception then taht one cannot attach a socket which isn't > detached. > So I called DetachThread before Attach Thread, but now I get the > exception that the > socket cannot be detached.
Call WSocket.ThreadDetach in the thread you created WSocket, call WSocket.ThreadAttach in the thread you want attach to. This can be done by posting a custom message to signal the other thread that the socket has been detached and can now be attached to a thread again. Don't call any other WSocket-methods in the thread to be attached before it has been attached. And, the thread to be attached requires a working message pump, otherwise even your custom message won't work. Arno Garrels -- 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