select 详解

Posted mingzhang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了select 详解相关的知识,希望对你有一定的参考价值。

In summary, a socket will be identified in a particular set when select returns if:

readfds:
If listen has been called and a connection is pending, accept will succeed.
Data is available for reading (includes OOB data if SO_OOBINLINE is enabled).
Connection has been closed/reset/terminated.

writefds:
If processing a connect call (nonblocking), connection has succeeded.
Data can be sent.

exceptfds:
If processing a connect call (nonblocking), connection attempt failed.
OOB data is available for reading (only if SO_OOBINLINE is disabled).

以上是关于select 详解的主要内容,如果未能解决你的问题,请参考以下文章

mysql基础篇 - SELECT 语句详解

SQLZOO习题详解(05)——SELECT within SELECT

SELECT语句详解

select 函数详解

linux下select函数详解及实例

详解JSOUP的select选择器语法