diff options
Diffstat (limited to 'include/sibs')
-rw-r--r-- | include/sibs/DirectConnection.hpp | 4 | ||||
-rw-r--r-- | include/sibs/IpAddress.hpp | 16 |
2 files changed, 13 insertions, 7 deletions
diff --git a/include/sibs/DirectConnection.hpp b/include/sibs/DirectConnection.hpp index 2137fd2..d96890b 100644 --- a/include/sibs/DirectConnection.hpp +++ b/include/sibs/DirectConnection.hpp @@ -25,8 +25,8 @@ namespace sibs enum class PubSubResult { - OK, - ERROR + RESULT_OK, + RESULT_ERROR }; struct DirectConnectionPeer; diff --git a/include/sibs/IpAddress.hpp b/include/sibs/IpAddress.hpp index 4403e83..54cb58a 100644 --- a/include/sibs/IpAddress.hpp +++ b/include/sibs/IpAddress.hpp @@ -3,12 +3,18 @@ #include <stdexcept> #include <string> #include <unordered_map> -#ifndef WIN32 - #include <arpa/inet.h> - #include <netdb.h> +#include "../env.hpp" +#if OS_FAMILY != OS_FAMILY_WINDOWS + #include <arpa/inet.h> + #include <netdb.h> #else - #include <winsock2.h> - #include <ws2tcpip.h> + #include <winsock2.h> + #include <ws2tcpip.h> + int inet_pton(int af, const char *src, void *dst); + int inet_pton4(const char *src, void *dst); + int inet_pton6(const char *src, void *dst); + typedef u_short sa_family_t; + typedef uint32_t in_addr_t; #endif namespace sibs |