// 连接Socket ret = connect(ClientSocket, (struct sockaddr*)&ClientAddr, sizeof(ClientAddr)); if (ret == SOCKET_ERROR) { printf("Socket Connect Failed! Error:%d\n", GetLastError()); getchar(); return -1; } else { printf("Socket Connect Succeed!"); } printf("Input Data: "); w...
WSADATA s;// 用来储存调用AfxSocketInit全局函数返回的Windows Sockets初始化信息SOCKET ClientSocket;structsockaddr_inClientAddr;// 一个sockaddr_in型的结构体对象intret =0;charSendBuffer[MAX_PATH];// Windows的MAX_PATH默认是260// 初始化Windows Socket// WSAStartup函数对Winsock服务的初始化if(WSAStartup(MA...