windows的总库包含了上述内容:#include <windows.h>#pragma comment(lib, "wsock32.lib")就可以了
2.windows平台下:
头文件#include<ws2tcpip.h>
linux平台下:
下面两个头文件都有定义:
1)#include <sys/socket.h>
2)#include <unistd.h>
windows的总库包含了上述内容:#include <windows.h>#pragma comment(lib, "wsock32.lib")就可以了
2.windows平台下:
头文件#include<ws2tcpip.h>
linux平台下:
下面两个头文件都有定义:
1)#include <sys/socket.h>
2)#include <unistd.h>