1 #ifndef WIN32_SOCKET_H 2 #define WIN32_SOCKET_H 3 4 #ifdef __WIN32 5 6 #include <winsock2.h> 7 8 #define ECONNRESET WSAECONNRESET 9 #define EINPROGRESS WSAEINPROGRESS 10 #define EALREADY WSAEALREADY 11 #define ioctl ioctlsocket 12 #define hstrerror(x) "" 13 #else 14 #include <sys/socket.h> 15 #include <sys/ioctl.h> 16 #include <netinet/in.h> 17 #include <netinet/tcp.h> 18 #include <sys/un.h> 19 #include <arpa/inet.h> 20 21 #include <netdb.h> 22 #endif 23 24 #endif 25