n"); wchy.sin_family=; wchy.sin_port=htons(5053); wchy.sin_addr.s_addr=inet_addr("127.0.0.1"); wchysSocket=socket(,SOCK_DGRAM,0); if(wchysSocket==INVALID_SOCKET) {printf("socket()Failed:%d\n",WSAGetLastError());return;} wchyiLen=sizeof(wchy); strcpy(send_buf,"^^"); MySendMessage(wchysSocket,send_buf,sizeof(send_buf),(structsockaddr*)&wchy,wchyiLen); } elseif(recv_buf[1]=='1') { printf("单聊对象未在线\n"); wchy.sin_family=; wchy.sin_port=htons(5053); wchy.sin_addr.s_addr=inet_addr("127.0.0.1"); wchysSocket=socket(,SOCK_DGRAM,0); if(wchysSocket==INVALID_SOCKET) {printf("socket()Failed:%d\n",WSAGetLastError());return;} wchyiLen=sizeof(wchy); strcpy(send_buf,"&&"); MySendMessage(wchysSocket,send_buf,sizeof(send_buf),(structsockaddr*)&wchy,wchyiLen); } break; } }?}?closesocket(sSocket);?WSACleanup();}