39#include "blocxx/BLOCXX_config.h"
50#if defined(BLOCXX_WIN32)
54#ifndef BLOCXX_HAVE_GETHOSTBYNAME_R
61#if !defined(BLOCXX_WIN32)
68#include <sys/socket.h>
69#ifdef BLOCXX_HAVE_SYS_RESOURCE_H
70#include <sys/resource.h>
96#ifdef BLOCXX_HAVE_IPV6
106#if defined(BLOCXX_WIN32)
127 Format(
"WSAEventSelect failed in waitForIO: %1",
190 Format(
"Resetting socket with WSAEventSelect failed: %1",
219 so.waitForRead =
true;
223 so.waitForWrite =
true;
227 so.waitForRead =
true;
228 so.waitForWrite =
true;
245 so.waitForRead =
true;
280#ifndef BLOCXX_HAVE_GETHOSTBYNAME_R
283namespace SocketUtils {
292#ifndef BLOCXX_HAVE_GETHOSTBYNAME_R
306#if (BLOCXX_GETHOSTBYNAME_R_ARGUMENTS == 6 || BLOCXX_GETHOSTBYNAME_R_ARGUMENTS == 5)
309#elif (BLOCXX_GETHOSTBYNAME_R_ARGUMENTS == 3)
313#error Not yet supported: gethostbyname_r() with other argument counts.
321#if (BLOCXX_GETHOSTBYNAME_R_ARGUMENTS == 6)
328#elif (BLOCXX_GETHOSTBYNAME_R_ARGUMENTS == 5)
334#elif (BLOCXX_GETHOSTBYNAME_R_ARGUMENTS == 3)
345#error Not yet supported: gethostbyname_r() with other argument counts.
376 Format(
"SocketUtils::getFullyQualifiedHostName: gethostname failed: %1(%2)",
389 Format(
"SocketUtils::getFullyQualifiedHostName: gethostbyname"
404#ifdef BLOCXX_HAVE_IPV6
#define BLOCXX_ASSERT(CON)
BLOCXX_ASSERT works similar to the assert() macro, but instead of calling abort(),...
#define BLOCXX_THROW(exType, msg)
Throw an exception using FILE and LINE.
Array<> wraps std::vector<> in COWReference<> adding ref counting and copy on write capability.
void push_back(const T &x)
Append an element to the end of the Array.
static ShutDownMechanism_t getShutDownMechanism()
This String class is an abstract data type that represents as NULL terminated string of characters.
A timeout can be absolute, which means that it will happen at the specified DateTime.
static Timeout relative(float seconds)
const int SELECT_TIMEOUT
The value returned from select when the timeout value has expired.
int selectRW(SelectObjectArray &selarray, UInt32 ms)
int waitForIO(SocketHandle_t fd, int timeOutSecs, SocketFlags::EWaitDirectionFlag waitFlag)
Wait for input or output on a socket.
String getFullyQualifiedHostName()
Get the fully qualified host name.
String inetAddrToString(UInt64 addr)
String lastErrorMsg(bool socketError)
bool operator==(const Array< T > &x, const Array< T > &y)