This is in a thread. When I want to shut down the application I enter 'X' into the console. This sets running to false, then I close the socket and do the clean up. However I keep getting the good old windows error message pop-up which I can't understand at all. I'm pretty sure it is because accept is blocking and I'm closing the socket?
How can I cancel the accept call? There was a WSACancelBlockingCall function, but I can't use that in Winsock 2 - it is unsupported.