摘要:
# include int poll (struct pollfd *fds, unsigned int nfds, int timeout);和select()不一样,poll()没有使用低效的三个基于位的文件描述符set,而是采用了一个单独的结构体pollfd数组,由fds指针指向这个组。pollfd结构体定义如下:#include struct pollfd {int fd; /* file descriptor */short events; /* requested events to watch */short revents; /* returned events witnes. 阅读全文