unsigned __stdcall CXXXChatRoomProcessor::ThreadFunc(void* lParam)
{
if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}
ThreadParam *p = (ThreadParam*)lParam;
CXXXChatRoomProcessor *processor = (CXXXChatRoomProcessor *)p->obj;
processor->isRunThread = TRUE;
if(processor->m_socket->m_hSocket!=NULL)
{
processor->m_bIsConnected = true;
processor->OnCloseSocket();
}
processor->m_socket->SetProxy( processor->nProxyType, processor->ProxyHost, processor->ProxyPort,
processor->ProxyUser, processor->ProxyPass, processor->bUseSocks5Logon );
if(!processor->m_socket->create())
{
processor->OnConnect(-1);
return false;
}
TRACE("正在连接聊天服务器/n");
processor->m_socket->
{
if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}
ThreadParam *p = (ThreadParam*)lParam;
CXXXChatRoomProcessor *processor = (CXXXChatRoomProcessor *)p->obj;
processor->isRunThread = TRUE;
if(processor->m_socket->m_hSocket!=NULL)
{
processor->m_bIsConnected = true;
processor->OnCloseSocket();
}
processor->m_socket->SetProxy( processor->nProxyType, processor->ProxyHost, processor->ProxyPort,
processor->ProxyUser, processor->ProxyPass, processor->bUseSocks5Logon );
if(!processor->m_socket->create())
{
processor->OnConnect(-1);
return false;
}
TRACE("正在连接聊天服务器/n");
processor->m_socket->