Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Typedefs | Functions
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 <arpa/inet.h>
#include <ifaddrs.h>
#include <limits.h>
#include <netdb.h>
#include <unistd.h>
#include "errno.h"
+ Include dependency graph for compat.h:
+ This graph shows which files directly or indirectly include this file:

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 closesocket(s)   myclosesocket(s)
 

Typedefs

typedef u_int SOCKET
 

Functions

int myclosesocket (SOCKET &hSocket)
 

Macro Definition Documentation

#define closesocket (   s)    myclosesocket(s)
#define INVALID_SOCKET   (SOCKET)(~0)
#define SOCKET_ERROR   -1
#define WSAEADDRINUSE   EADDRINUSE

Definition at line 56 of file compat.h.

Referenced by BindListenPort().

#define WSAEALREADY   EALREADY

Definition at line 51 of file compat.h.

#define WSAEINPROGRESS   EINPROGRESS

Definition at line 55 of file compat.h.

Referenced by ConnectSocketDirectly(), RecvLine(), SocketSendData(), and ThreadSocketHandler().

#define WSAEINTR   EINTR

Definition at line 54 of file compat.h.

Referenced by RecvLine(), SocketSendData(), and ThreadSocketHandler().

#define WSAEINVAL   EINVAL

Definition at line 50 of file compat.h.

Referenced by ConnectSocketDirectly().

#define WSAEMSGSIZE   EMSGSIZE

Definition at line 53 of file compat.h.

Referenced by RecvLine(), SocketSendData(), and ThreadSocketHandler().

#define WSAENOTSOCK   EBADF

Definition at line 57 of file compat.h.

Referenced by myclosesocket().

#define WSAEWOULDBLOCK   EWOULDBLOCK

Definition at line 52 of file compat.h.

Referenced by ConnectSocketDirectly(), RecvLine(), SocketSendData(), and ThreadSocketHandler().

#define WSAGetLastError ( )    errno

Typedef Documentation

typedef u_int SOCKET

Definition at line 47 of file compat.h.

Function Documentation

int myclosesocket ( SOCKET hSocket)
inline

Definition at line 62 of file compat.h.

References closesocket, INVALID_SOCKET, and WSAENOTSOCK.