#pragma once #if BOOST_OS_WINDOWS #include #include typedef int socklen_t; #define GETLASTERR WSAGetLastError() #elif BOOST_OS_UNIX #include #include #include #include #include #include #define WSAEWOULDBLOCK EWOULDBLOCK #define WSAEINPROGRESS EINPROGRESS #define WSAESHUTDOWN ESHUTDOWN #define WSAECONNABORTED ECONNABORTED #define WSAHOST_NOT_FOUND EAI_NONAME #define WSAENOTCONN ENOTCONN #define GETLASTERR errno #define SOCKET int #define closesocket close #define SOCKET_ERROR -1 #define INVALID_SOCKET -1 #endif // BOOST_OS_UNIX