首页 > 代码库 > APUE:网络IPC:套接字
APUE:网络IPC:套接字
#define AF_UNSPEC PF_UNSPEC #define AF_LOCAL PF_LOCAL #define AF_UNIX PF_UNIX #define AF_INET PF_INET #define AF_INET6 PF_INET6 enum __socket_type { SOCK_STREAM = 1, /* Sequenced, reliable, connection-based byte streams. */ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams of fixed maximum length. */ SOCK_RAW = 3, /* Raw protocol interface. */ }; int socket (int __domain, int __type, int __protocol); int shutdown (int __fd, int __how); int close (int __fd); int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); int listen (int __fd, int __n); int accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len); int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len); ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); ssize_t sendto (int __fd, const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); ssize_t sendmsg (int __fd, const struct msghdr *__message, int __flags); ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen); int setsockopt (int __fd, int __level, int __optname, const void *__optval, socklen_t __optlen);
APUE:网络IPC:套接字
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。