WSAStartup(WORD wVersion,WSADATA* wsaData);
socket(AF_INET,SOCK_STREAM,0);
SOCKADDR_IN addrSrv;//将IP-PORT存入addrSrv
connect(SOCKET,(SOCKADDR*),sizeof(SOCKADDR));
recv(SOCKET,recvBuf,size,0);
send(SOCKET,sendBuf,strlen(sendBuf),0);
closesocket(SOCKET);
WSACleanup();
时间: 2024-11-10 15:24:15