Ok, I have a program that creates threads that each listen on a port, The problem is that when I call accept() in the thread, It means I can't close the thread without calling TerminateThread(), which I've been advised in the past not to do. So what I'm asking, is there a way that I can cause accept() to end? I tried calling WSACleanup() from my main thread, but It doesn't effect anything?
I just need a way to cause an error within accept() to make it stop.
thanks