winsock select() 返回值
来源:互联网 发布:excel数据清洗工具 编辑:程序博客网 时间:2024/06/05 10:34
The select function determines the status of one or more sockets, waiting if necessary, to perform synchronous I/O.
Syntax
int select( __in int nfds, __inout fd_set *readfds, __inout fd_set *writefds, __inout fd_set *exceptfds, __in const struct timeval *timeout);
Parameters
- nfds [in]
Ignored. The nfds parameter is included only for compatibility with Berkeley sockets.
- readfds [in, out]
An optional pointer to a set of sockets to be checked for readability.
- writefds [in, out]
An optional pointer to a set of sockets to be checked for writability.
- exceptfds [in, out]
An optional pointer to a set of sockets to be checked for errors.
- timeout [in]
The maximum time for select to wait, provided in the form of a TIMEVAL structure. Set the timeout parameter to null for blocking operations.
Return value
The select function returns the total number of socket handles that are ready and contained in the fd_set structures, zero if the time limit expired, or SOCKET_ERROR if an error occurred. If the return value is SOCKET_ERROR, WSAGetLastError can be used to retrieve a specific error code.
1.如果超时返回 0
2.返回fd_set 中准备好的socket个数(不包括零)
3.如果没有准备好的返回 -1
- winsock select() 返回值
- WinSock客户端和服务端(select模型)
- WinSock的recv返回值处理
- linxu select 返回值
- winsock select服务端模型
- Winsock Select模型范例
- Winsock Select模型范例
- WINSOCK SELECT模型
- winsock的select模型
- Winsock Select模型范例
- winsock Select模型
- winsock的select模型
- winsock的select模型
- winsock select模型例子
- winsock select模型客户端
- Winsock select client
- Winsock select编程模型
- select返回一个固定值
- jqyery(ajax) div css 构建界面布局
- Android开发中的单元测试-初级教程(02)
- easyui datagrid属性动态设置实例
- oracle分析函数row_number、dense_rank、rank的区别
- 查找某个branch里面所有修改的文件
- winsock select() 返回值
- 【iphone应用开发】iPhone应用开发之一:窗口,视图,视图控制器和UIKit基础
- DSP/BIOS详解入门
- 本地通知+ 远程push
- 程序开发中乱码的出现情况及解决方案
- 商务邮件写作指南
- webservice的原理及概念
- 事件驱动下的类通信~
- 关闭程序的“进程”