Dash Core  0.12.2.1
P2P Digital Currency
compat.h File Reference
#include <sys/fcntl.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <limits.h>
#include <netdb.h>
#include <unistd.h>
#include "errno.h"

Go to the source code of this file.

Macros

#define WSAGetLastError()   errno
 
#define WSAEINVAL   EINVAL
 
#define WSAEALREADY   EALREADY
 
#define WSAEWOULDBLOCK   EWOULDBLOCK
 
#define WSAEMSGSIZE   EMSGSIZE
 
#define WSAEINTR   EINTR
 
#define WSAEINPROGRESS   EINPROGRESS
 
#define WSAEADDRINUSE   EADDRINUSE
 
#define WSAENOTSOCK   EBADF
 
#define INVALID_SOCKET   (SOCKET)(~0)
 
#define SOCKET_ERROR   -1
 
#define MAX_PATH   1024
 
#define MSG_NOSIGNAL   0
 
#define PRIO_MAX   20
 
#define THREAD_PRIORITY_LOWEST   PRIO_MAX
 
#define THREAD_PRIORITY_BELOW_NORMAL   2
 
#define THREAD_PRIORITY_NORMAL   0
 
#define THREAD_PRIORITY_ABOVE_NORMAL   (-2)
 

Typedefs

typedef u_int SOCKET
 

Functions

size_t strnlen (const char *start, size_t max_len)
 
static bool IsSelectableSocket (SOCKET s)
 

Macro Definition Documentation

◆ INVALID_SOCKET

◆ MAX_PATH

#define MAX_PATH   1024

Definition at line 73 of file compat.h.

Referenced by FormatException(), and GetTempPath().

◆ MSG_NOSIGNAL

#define MSG_NOSIGNAL   0

Definition at line 78 of file compat.h.

Referenced by CConnman::SocketSendData(), and Socks5().

◆ PRIO_MAX

#define PRIO_MAX   20

Definition at line 84 of file compat.h.

◆ SOCKET_ERROR

◆ THREAD_PRIORITY_ABOVE_NORMAL

#define THREAD_PRIORITY_ABOVE_NORMAL   (-2)

Definition at line 89 of file compat.h.

◆ THREAD_PRIORITY_BELOW_NORMAL

#define THREAD_PRIORITY_BELOW_NORMAL   2

Definition at line 87 of file compat.h.

Referenced by CConnman::ThreadMessageHandler().

◆ THREAD_PRIORITY_LOWEST

#define THREAD_PRIORITY_LOWEST   PRIO_MAX

Definition at line 86 of file compat.h.

Referenced by BitcoinMiner().

◆ THREAD_PRIORITY_NORMAL

#define THREAD_PRIORITY_NORMAL   0

Definition at line 88 of file compat.h.

Referenced by BitcoinMiner().

◆ WSAEADDRINUSE

#define WSAEADDRINUSE   EADDRINUSE

Definition at line 61 of file compat.h.

Referenced by CConnman::BindListenPort().

◆ WSAEALREADY

#define WSAEALREADY   EALREADY

Definition at line 56 of file compat.h.

◆ WSAEINPROGRESS

#define WSAEINPROGRESS   EINPROGRESS

◆ WSAEINTR

#define WSAEINTR   EINTR

Definition at line 59 of file compat.h.

Referenced by CConnman::SocketSendData(), and CConnman::ThreadSocketHandler().

◆ WSAEINVAL

#define WSAEINVAL   EINVAL

Definition at line 55 of file compat.h.

Referenced by ConnectSocketDirectly(), and InterruptibleRecv().

◆ WSAEMSGSIZE

#define WSAEMSGSIZE   EMSGSIZE

Definition at line 58 of file compat.h.

Referenced by CConnman::SocketSendData(), and CConnman::ThreadSocketHandler().

◆ WSAENOTSOCK

#define WSAENOTSOCK   EBADF

Definition at line 62 of file compat.h.

◆ WSAEWOULDBLOCK

#define WSAEWOULDBLOCK   EWOULDBLOCK

◆ WSAGetLastError

Typedef Documentation

◆ SOCKET

typedef u_int SOCKET

Definition at line 52 of file compat.h.

Function Documentation

◆ IsSelectableSocket()

static bool IsSelectableSocket ( SOCKET  s)
inlinestatic

◆ strnlen()

size_t strnlen ( const char *  start,
size_t  max_len 
)

Definition at line 12 of file strnlen.cpp.

Referenced by CMessageHeader::GetCommand().