1 #ifndef ACL_LISTEN_INCLUDE_H 2 #define ACL_LISTEN_INCLUDE_H 8 #include "../stdlib/acl_define.h" 10 #include <sys/socket.h> 14 #define ACL_INET_FLAG_NONE 0 15 #define ACL_INET_FLAG_NBLOCK 1 16 #define ACL_INET_FLAG_REUSEPORT 1 << 1 17 #define ACL_INET_FLAG_FASTOPEN 1 << 2 18 #define ACL_INET_FLAG_EXCLUSIVE 1 << 3 27 ACL_API ACL_SOCKET
acl_sane_accept(ACL_SOCKET sock,
struct sockaddr * sa,
40 ACL_API ACL_SOCKET
acl_accept(ACL_SOCKET sock,
char *buf,
size_t size,
55 ACL_API ACL_SOCKET
acl_inet_listen(
const char *addr,
int backlog,
unsigned flag);
84 ACL_API ACL_SOCKET
acl_inet_bind(
const struct addrinfo *res,
unsigned flag);
95 ACL_API ACL_SOCKET acl_unix_dgram_bind(
const char *addr,
unsigned flag);
108 ACL_API ACL_SOCKET
acl_udp_bind3(
const char *addr,
unsigned flag,
int *family);
109 ACL_API ACL_SOCKET
acl_udp_bind(
const char *addr,
unsigned flag);
121 ACL_API ACL_SOCKET acl_unix_listen(
const char *addr,
int backlog,
unsigned flag);
128 ACL_API ACL_SOCKET acl_unix_accept(ACL_SOCKET fd);
132 ACL_API
int acl_fifo_listen(
const char *path,
int permissions,
int mode);
136 #if defined(_WIN32) || defined(_WIN64) 139 typedef SOCKET (WSAAPI *
acl_accept_fn)(SOCKET,
struct sockaddr FAR *,
140 LPINT, LPCONDITIONPROC, DWORD_PTR);
143 typedef SOCKET (WINAPI *
acl_accept_fn)(SOCKET,
struct sockaddr*, socklen_t*);
ACL_API ACL_SOCKET acl_udp_bind3(const char *addr, unsigned flag, int *family)
ACL_API ACL_SOCKET acl_udp_bind(const char *addr, unsigned flag)
ACL_API ACL_SOCKET acl_inet_accept(ACL_SOCKET listen_fd)
ACL_API void acl_set_accept(acl_accept_fn fn)
ACL_API ACL_SOCKET acl_inet_accept_ex(ACL_SOCKET listen_fd, char *ipbuf, size_t size)
ACL_API ACL_SOCKET acl_accept(ACL_SOCKET sock, char *buf, size_t size, int *sock_type)
ACL_API ACL_SOCKET acl_inet_bind(const struct addrinfo *res, unsigned flag)
int(* acl_accept_fn)(int, struct sockaddr *, socklen_t *)
ACL_API ACL_SOCKET acl_sane_accept(ACL_SOCKET sock, struct sockaddr *sa, socklen_t *len)
ACL_API ACL_SOCKET acl_inet_listen(const char *addr, int backlog, unsigned flag)