摘要:
//Server #include "stdafx.h" #include #include #include using namespace std; #pragma comment (lib,"ws2_32.lib") #define PORT 6000 //UDP Server int main() { //初始化网络环境 WSADATA wsa; if (WS... 阅读全文
摘要:
#include "stdafx.h" #include #include #include using namespace std; #pragma comment (lib,"ws2_32.lib") //Client int main() { WSADATA wsa; if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0) { ... 阅读全文
摘要:
//Sever #include "stdafx.h" #include #include #include using namespace std; #pragma comment (lib,"ws2_32.lib") #define PORT 6000 DWORD WINAPI clientProc(LPVOID lparam) { //为客户端服务 SOCKET soc... 阅读全文