31#ifndef QB_IO_CONFIG_HPP
32#define QB_IO_CONFIG_HPP
48#define QB_ENABLE_UDS 1
64#if defined(QB_HEADER_ONLY)
65#define QB__DECL inline
77#if !defined(_WIN32) || QB__64BITS
78#define QB_INTEROP_DECL
80#define QB_INTEROP_DECL __stdcall
90#define QB_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
99#define QB_SSIZEOF(T) static_cast<int>(sizeof(T))
111#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
112# define QB_OBSOLETE_DEPRECATE(_Replacement) __attribute__((deprecated))
113#elif _MSC_VER >= 1400
114# define QB_OBSOLETE_DEPRECATE(_Replacement) \
115 __declspec(deprecated("This function will be removed in the future. Consider using " #_Replacement " instead."))
117# define QB_OBSOLETE_DEPRECATE(_Replacement)
121#if defined(UE_BUILD_DEBUG) || defined(UE_BUILD_DEVELOPMENT) || \
122 defined(UE_BUILD_TEST) || defined(UE_BUILD_SHIPPING) || defined(UE_SERVER)
123#define QB_INSIDE_UNREAL 1
135#define QB_VERSION_NUM 0x033705
143#define QB_DEFAULT_MULTICAST_TTL (int) 128
151#define QB_INET_BUFFER_SIZE 65536
160#define QB_MAX_PDU_BUFFER_SIZE static_cast<int>(1 * 1024 * 1024)
169#define QB_UNPACK_MAX_STRIP 32
172#if !defined(WIN32_LEAN_AND_MEAN)
173#define WIN32_LEAN_AND_MEAN
181#if defined(_WIN32) && !defined(_WINSTORE)
186#if defined(QB_NT_COMPAT_GAI)
193typedef int socklen_t;
194#define FD_TO_SOCKET(fd) _get_osfhandle(fd)
195#define OPEN_FD_FROM_SOCKET(sock) _open_osfhandle(sock, 0)
197#pragma comment(lib, "ws2_32.lib")
203#include <sys/ioctl.h>
205#include <sys/types.h>
207#if defined(__linux__)
208#include <sys/epoll.h>
210#include <arpa/inet.h>
212#include <netinet/in.h>
213#include <netinet/tcp.h>
214#include <sys/select.h>
215#include <sys/socket.h>
217#if !defined(SD_RECEIVE)
225#define SD_RECEIVE SHUT_RD
235#define SD_SEND SHUT_WR
245#define SD_BOTH SHUT_RDWR
247#if !defined(closesocket)
254#define closesocket close
256#if !defined(ioctlsocket)
263#define ioctlsocket ioctl
265#if defined(__linux__)
266#define SO_NOSIGPIPE MSG_NOSIGNAL
283#define FD_TO_SOCKET(fd) fd
292#define OPEN_FD_FROM_SOCKET(sock) sock
315#undef EPROTONOSUPPORT
316#undef ESOCKTNOSUPPORT
348#define EWOULDBLOCK WSAEWOULDBLOCK
349#define EINPROGRESS WSAEINPROGRESS
350#define EALREADY WSAEALREADY
351#define ENOTSOCK WSAENOTSOCK
352#define EDESTADDRREQ WSAEDESTADDRREQ
353#define EMSGSIZE WSAEMSGSIZE
354#define EPROTOTYPE WSAEPROTOTYPE
355#define ENOPROTOOPT WSAENOPROTOOPT
356#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
357#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
358#define EOPNOTSUPP WSAEOPNOTSUPP
359#define EPFNOSUPPORT WSAEPFNOSUPPORT
360#define EAFNOSUPPORT WSAEAFNOSUPPORT
361#define EADDRINUSE WSAEADDRINUSE
362#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
363#define ENETDOWN WSAENETDOWN
364#define ENETUNREACH WSAENETUNREACH
365#define ENETRESET WSAENETRESET
366#define ECONNABORTED WSAECONNABORTED
367#define ECONNRESET WSAECONNRESET
368#define ENOBUFS WSAENOBUFS
369#define EISCONN WSAEISCONN
370#define ENOTCONN WSAENOTCONN
371#define ESHUTDOWN WSAESHUTDOWN
372#define ETOOMANYREFS WSAETOOMANYREFS
373#define ETIMEDOUT WSAETIMEDOUT
374#define ECONNREFUSED WSAECONNREFUSED
375#define ELOOP WSAELOOP
376#define ENAMETOOLONG WSAENAMETOOLONG
377#define EHOSTDOWN WSAEHOSTDOWN
378#define EHOSTUNREACH WSAEHOSTUNREACH
379#define ENOTEMPTY WSAENOTEMPTY
380#define EPROCLIM WSAEPROCLIM
381#define EUSERS WSAEUSERS
382#define EDQUOT WSAEDQUOT
383#define ESTALE WSAESTALE
384#define EREMOTE WSAEREMOTE
385#define EBADF WSAEBADF
386#define EFAULT WSAEFAULT
387#define EAGAIN WSATRY_AGAIN
406#define IN_MAX_ADDRSTRLEN INET6_ADDRSTRLEN
Platform, compiler, and C++ feature detection macros for the QB Framework.
int socket_type
Cross-platform socket handle type.
Definition config.h:274
System signal event handler for asynchronous I/O.