摘要: #include #include unix_socket = socket(AF_UNIX, type, 0);error = socketpair(AF_UNIX, type, int *sv);#define UNIX_PATH_MAX 108struct sockaddr_un { sa_family_t sun_family; /* AF_UNIX */ ... 阅读全文
posted @ 2013-07-30 20:31 srk 阅读(132) 评论(0) 推荐(0) 编辑
摘要: /* timeout */#include unsigned int alarm(unsigned int seconds);/* select *//* SO_RECVTIMEO SO_SENDTIMEO */#include ssize_t readv(int fd, const struct iovec *iov, int iovcnt);ssize_t writev(int fd, co... 阅读全文
posted @ 2013-07-30 20:29 srk 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #include void openlog(const char *ident, int option, int facility);void syslog(int priority, const char *format, ...);void closelog(void);#include void vsyslog(int priority, const char *format, va_lis... 阅读全文
posted @ 2013-07-30 20:26 srk 阅读(120) 评论(0) 推荐(0) 编辑
摘要: #include extern int h_errno;struct hostent *gethostbyname(const char *name);#include struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type);void sethostent(int stayopen);void endhost... 阅读全文
posted @ 2013-07-30 20:23 srk 阅读(150) 评论(0) 推荐(0) 编辑
摘要: #include #include ssize_t send(int sockfd, const void* buf, size_t len, int flags);ssize_t sendto(int sockfd, const void* buf, size_t len, int flags, const struct sockaddr* dest_addr, so... 阅读全文
posted @ 2013-07-30 20:21 srk 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #include #include int getsockopt(int sockfd, int level, int opname, void* optval, socklen_t* optlen);int setsockopt(int sockfd, int level, int opname, const void* optval, s... 阅读全文
posted @ 2013-07-30 20:11 srk 阅读(340) 评论(0) 推荐(0) 编辑