Macros | Functions
anet.h File Reference

Go to the source code of this file.

Macros

#define ANET_ERR   -1
 
#define ANET_ERR_LEN   256
 
#define ANET_OK   0
 

Functions

int anetNonBlock (char *err, int fd)
 
int anetPeerToString (int fd, char *ip, int *port)
 
int anetRead (int fd, char *buf, int count)
 
int anetResolve (char *err, char *host, char *ipbuf)
 
int anetSetSendBuffer (char *err, int fd, int buffsize)
 
int anetTcpAccept (char *err, int serversock, char *ip, int *port)
 
int anetTcpConnect (char *err, char *addr, int port)
 
int anetTcpKeepAlive (char *err, int fd)
 
int anetTcpNoDelay (char *err, int fd)
 
int anetTcpNonBlockConnect (char *err, char *addr, int port)
 
int anetTcpServer (char *err, int port, char *bindaddr)
 
int anetUnixAccept (char *err, int serversock)
 
int anetUnixConnect (char *err, char *path)
 
int anetUnixNonBlockConnect (char *err, char *path)
 
int anetUnixServer (char *err, char *path, mode_t perm)
 
int anetWrite (int fd, char *buf, int count)
 

Macro Definition Documentation

#define ANET_ERR   -1
#define ANET_ERR_LEN   256

Definition at line 36 of file anet.h.

Referenced by anetSetError().

#define ANET_OK   0

Function Documentation

int anetNonBlock ( char *  err,
int  fd 
)
int anetPeerToString ( int  fd,
char *  ip,
int *  port 
)

Definition at line 354 of file anet.c.

int anetRead ( int  fd,
char *  buf,
int  count 
)

Definition at line 229 of file anet.c.

int anetResolve ( char *  err,
char *  host,
char *  ipbuf 
)

Definition at line 107 of file anet.c.

References ANET_ERR, ANET_OK, and anetSetError().

int anetSetSendBuffer ( char *  err,
int  fd,
int  buffsize 
)

Definition at line 87 of file anet.c.

References ANET_ERR, ANET_OK, and anetSetError().

Referenced by modesAcceptClients().

int anetTcpAccept ( char *  err,
int  serversock,
char *  ip,
int *  port 
)

Definition at line 332 of file anet.c.

References ANET_ERR, anetGenericAccept(), and fd.

Referenced by modesAcceptClients().

int anetTcpConnect ( char *  err,
char *  addr,
int  port 
)

Definition at line 181 of file anet.c.

References ANET_CONNECT_NONE, and anetTcpGenericConnect().

Referenced by main().

int anetTcpKeepAlive ( char *  err,
int  fd 
)

Definition at line 97 of file anet.c.

References ANET_ERR, ANET_OK, and anetSetError().

int anetTcpNoDelay ( char *  err,
int  fd 
)

Definition at line 76 of file anet.c.

References ANET_ERR, ANET_OK, and anetSetError().

int anetTcpNonBlockConnect ( char *  err,
char *  addr,
int  port 
)

Definition at line 186 of file anet.c.

References ANET_CONNECT_NONBLOCK, and anetTcpGenericConnect().

int anetTcpServer ( char *  err,
int  port,
char *  bindaddr 
)

Definition at line 275 of file anet.c.

References ANET_ERR, anetCreateSocket(), anetListen(), anetSetError(), and utl::s.

Referenced by modesInitNet().

int anetUnixAccept ( char *  err,
int  serversock 
)

Definition at line 344 of file anet.c.

References ANET_ERR, anetGenericAccept(), and fd.

int anetUnixConnect ( char *  err,
char *  path 
)

Definition at line 217 of file anet.c.

References ANET_CONNECT_NONE, and anetUnixGenericConnect().

int anetUnixNonBlockConnect ( char *  err,
char *  path 
)

Definition at line 222 of file anet.c.

References ANET_CONNECT_NONBLOCK, and anetUnixGenericConnect().

int anetUnixServer ( char *  err,
char *  path,
mode_t  perm 
)

Definition at line 297 of file anet.c.

References ANET_ERR, anetCreateSocket(), anetListen(), and utl::s.

int anetWrite ( int  fd,
char *  buf,
int  count 
)

Definition at line 244 of file anet.c.


, generated on Tue Sep 26 2023.