Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1455251
  • 博文数量: 596
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 173
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-06 15:50
个人简介

在线笔记

文章分类

全部博文(596)

文章存档

2016年(1)

2015年(104)

2014年(228)

2013年(226)

2012年(26)

2011年(11)

分类: LINUX

2013-01-29 10:06:32

       int select(int nfds, fd_set *readfds, fd_set *writefds,
                  fd_set *exceptfds, struct timeval *timeout);

       timeout  is  an  upper bound on the amount of time elapsed before select() returns.  If

       both fields of the timeval stucture are zero, then select() returns immediately.  (This

       is  useful  for  polling.)  If timeout is NULL (no timeout), select() can block indefinitely.


select阻塞超过timeout时间,就返回0。

如果timeout是0,则select直接返回0;

如果timeout是NULL,则select会阻塞,时间不确定。

阅读(723) | 评论(0) | 转发(0) |
0

上一篇:HRGN,剪裁区域

下一篇:X.509标准

给主人留下些什么吧!~~