Linux 中系统调用 select,poll,epoll 优缺点总结selectpollepoll
select示例函数原型typedef struct { unsigned long fds_bits [__FDSET_LONGS];} fd_set;int select(int ndfs, fd_set *readfds, fd_set *writefds, fd_set *exceptefds, struct timeval *timeout);使用示例:fd_set readfds,allfds;FD_ZERO(&allfds);FD_SET(1, &a