网络编程库函数,实现收发数据,网络协议为UDP,可以直接引入到自己的程序中,无需修改。-Network programming library functions, implementation to send and receive data, the network protocol for the UDP, can be directly introduced into the process of their own, no need to change.
#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include #include #include #pragma comment(lib, "ws2_32") // Set the packing to a 1 byte boundary #include // // Define the IPv4 header. Make the version and length field one // char