It seems you try a friendly shutdown, while Max from Mutella loves it the hard way to disconnect.
About friendly disconnect, shouldn't it be:
while(m_bDataSending && !m_bForceDisconnect); //wait until send buffer cleared
AsyncSelect(0);
Shutdown(1); //perform a friendly TCP shutdowm
while(Receive(m_aBuffer, sizeof(m_aBuffer))>0 && !m_bForceDisconnect);
CAsyncSocket::Close()
Greets, Moak
PS: Okay this doesn't work too. Since there is no possibility to get interrupted by a class method that sets m_bForceDisconnect. Perhaps it's a
conceptional design weakness in CAsyncSocket?