> > And the socket has been _created in method execute as well? > > How do you achieve that client sockets run in the client thread > > if not using ThreadAttach/ThreadDetach?
> Hm, no it is created before execute. And no thread attach/detach is used. > It works so far until the point when I try to close it. This means you don't need a thread for your socket. Since you have not created the component in the thread's context and you have not attached it, you thread is _not_ used for the component event. It is the thread having created the component which handle the component events, unless you use ThreadAttach. Of course, your program is likely to crash because doing as you have done, you have two threads simultaneously refering to the same component. You must be sure to use critical sections and the likes to protect everything shared between your threads. Probably the problem you experience when closing the socket is a result of this thread mess ! -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be -- 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