基于無線通信技術(shù)的智能公交系統(tǒng)設(shè)計(二)
DWORD WINAPI AnswerThread ( LPVOIDlparam) //收發(fā)線程入口
{//創(chuàng)建線程時把服務(wù)器建立的新套接字傳給lparam
SOCKET ClientSocket = ( SOCKET) ( LPVOID)lparam;
int bytesRecv;char sendbuf [ 32] = " " ;char
recvbuf [32] ="" ;
while (1)
{bytesRecv=SOCKET_ERROR;
for ( int i =0;i ( int) strlen ( recvbuf) ;i ++ )
{recvbuf [i] ='