X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=octopi%2Flibrary%2Fsockets%2Ftcpip_stack.cpp;h=37fcb2d5418d59230cd96419e56fb4985e49dbfe;hb=HEAD;hp=f45ea6aaf73557705066bb1abf47e76f55a2ecdb;hpb=2952ccf47b80174880141a7ecfa122089f349b8d;p=feisty_meow.git diff --git a/octopi/library/sockets/tcpip_stack.cpp b/octopi/library/sockets/tcpip_stack.cpp index f45ea6aa..37fcb2d5 100644 --- a/octopi/library/sockets/tcpip_stack.cpp +++ b/octopi/library/sockets/tcpip_stack.cpp @@ -19,7 +19,7 @@ #include #include -#ifdef __UNIX__ +//#ifdef __UNIX__ #include #include #include @@ -30,11 +30,12 @@ #include #include #include -#endif +//#endif using namespace basis; using namespace loggers; using namespace structures; +using namespace textual; namespace sockets { @@ -46,10 +47,12 @@ namespace sockets { ////////////// + /* #ifdef __WIN32__ const WORD WINSOCK_VERSION_REQUIRED = 0x0101; // 1.1 version is used by this version of tcp/ip transport. #endif +*/ ////////////// @@ -86,6 +89,7 @@ tcpip_stack::~tcpip_stack() bool tcpip_stack::initialize_tcpip() { + /* #ifdef __WIN32__ FUNCDEF("initialize_tcpip"); // make sure we have the right version of WinSock available. @@ -97,14 +101,15 @@ bool tcpip_stack::initialize_tcpip() return false; } #endif +*/ return true; } void tcpip_stack::deinitialize_tcpip() { -#ifdef __WIN32__ +/*#ifdef __WIN32__ WSACleanup(); -#endif +#endif*/ } astring tcpip_stack::hostname() const @@ -167,7 +172,7 @@ astring tcpip_stack::tcpip_error_name(int error_value) case SOCK_EDQUOT: return "EDQUOT"; case SOCK_ESTALE: return "ESTALE"; case SOCK_EREMOTE: return "EREMOTE"; -#ifdef __WIN32__ +/* #ifdef __WIN32__ case SOCK_EPROCLIM: return "EPROCLIM"; case SOCK_SYSNOTREADY: return "SYSNOTREADY"; case SOCK_VERNOTSUPPORTED: return "VERNOTSUPPORTED"; @@ -177,6 +182,7 @@ astring tcpip_stack::tcpip_error_name(int error_value) case SOCK_NO_DATA: return "NO_DATA"; // or NO_ADDRESS. case SOCK_NOTINITIALISED: return "NOTINITIALISED"; #endif +*/ } // return a standard OS error... @@ -251,7 +257,7 @@ bool tcpip_stack::enumerate_adapters(machine_uid_array &ip_addresses, sockaddr tcpip_stack::convert(const internet_address &make_from) { -// FUNCDEF("convert [to sockaddr]"); + FUNCDEF("convert [to sockaddr]"); sockaddr_in new_socket; // our socket. memset(&new_socket, 0, sizeof(new_socket)); // clear it out. new_socket.sin_family = AF_INET; @@ -308,7 +314,7 @@ byte_array tcpip_stack::full_resolve(const astring &hostname, bool tcpip_stack::resolve_any(const astring &hostname, internet_address &to_return) const { -// FUNCDEF("resolve_any"); + FUNCDEF("resolve_any"); to_return = internet_address(); if (!hostname) return false; // blank hostnames go nowhere. astring full_host; @@ -324,7 +330,7 @@ bool tcpip_stack::resolve_any(const astring &hostname, astring tcpip_stack::dns_resolve(const astring &hostname) const { -// FUNCDEF("dns_resolve"); + FUNCDEF("dns_resolve"); if (!hostname) return ""; // blank hostnames go nowhere. if (hostname.iequals("local") || hostname.iequals("localhost")) { return "127.0.0.1";