I have been trying to go through all of the threads on this topic, but having no luck. I have a server set up, with a connection thread listening for new connections. So the thread enters the accept call and just stays there. When the program terminates, and I try to delete the thread, it will not delete because accept is still blocking it. I have seen references to non-blocking sockets, but cannot figure how to set that up. Any suggestions? Thank you.