文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>I/O模型--select与poll.

I/O模型--select与poll.

时间:2010-09-28  来源:noyear

Unix五种I/O模型:
阻塞I/O模型
非阻塞I/O模型
I/O复用模型
信号驱动I/O模型
异步I/O模型
复用模型常用函数select和poll.select函数相关的四个宏:
void FD_ZERO (fd_set * fdset); //clear all bits in fdset
void FD_SET (int fd, fd_set *fdset); // turn on the bit for fd in
fdset
void FD_CLR (int fd, fd_set *fdset); // turn off the bit for fd in
fdset
int FD_ISSET (int fd, fd_set * fdset); // is the bit for fd on in
fdset ?*/
select中三个指针变量指向readset,writeset,exceptset他们都是值-結果参
数。
最大描述字指待测试的描述字个数,它的值是待测试的最大描述字加1。

相关阅读 更多 +
排行榜 更多 +
火柴人战争血腥打击

火柴人战争血腥打击

飞行射击 下载
沉浸式射击比赛

沉浸式射击比赛

飞行射击 下载
三角符文第一章下载

三角符文第一章下载

角色扮演 下载