So, i have a CSocket listening in a worker thread, it would do a blocking accept and then spin another thread (yea, i know perfermance not a issue) for each new connection.
How one is supposed stop listen?
You cannot call it close from another thread because the CSocket will trown an assert.
Any quick fix or just throw away this terribile badly designed wrapper?
From MSDN:
If you are creating a performance critical program, I’d personally use IOCP.
The code is going to look similar to:
In your thread procedure,