Debug Assertion ASSERT(pState->m_hSocketWindow != NULL) guess What :) I just tried the Close in the MainThread
-
All I just took a pot shot and tried the Close in the Main Thread no problem My question is Who Designed this I don't understand how he she or whoever designed this Thanks :-D Hi, I am getting a debug assertion trying to close a socket that I used to send data At First I thought that my CAsynSocket->m_hSocket wasn't the same as I originally Created Let me back track a bit my CAsynSockets are wrapped in their own CWinThread (UI) So I know when I get notification OnSend.. OnConnect etc they are in the context of the MainThread I made note of the m_hSocket after Create and then when I got Notification it was okay to send OnSend I looked at this->m_hSocket and it was the same handle I save the original CWinThread threadid in the CAsyncSocket class So After I get OnSend from the main Thread I do a PostThreadMessage to have CwinThread (UI) do the send works fine I get the assert trying to Close the Socket this is done in the context of the Thread that Created it via PostThreadMessage All the while the m_hSocket has the same Value