void* NetSocket::WorkThread(void *lpParam) { NetSocket *pThis = (NetSocket*)lpParam; pThis->ConnectServer(); while( pThis->m_bIsConnected ) { pThis->NetLogic(); } return NULL; }
DWORD WINAPI NetSocket::WorkThread(LPVOID lparam) { NetSocket *pThis = (NetSocket*)lparam; pThis->ConnectServer(); while( pThis->m_bIsConnected ) { pThis->NetLogic(); Sleep( 2 ); } return 0; }