fastdo  0.6.8
eiennet::io::Select类 参考

Select Io模型 更多...

#include <eiennet_socket.hpp>

类 eiennet::io::Select 继承关系图:
eiennet::io::Select 的协作图:

Public 成员函数

 Select ()
 Select模型构造函数 更多...
 
SelectsetReadSock (Socket const &sock)
 
SelectsetReadFd (int fd)
 
SelectdelReadFd (int fd)
 
SelectsetReadFds (winux::Mixed const &fds)
 
SelectclearReadFds ()
 
SelectsetWriteSock (Socket const &sock)
 
SelectsetWriteFd (int fd)
 
SelectdelWriteFd (int fd)
 
SelectsetWriteFds (winux::Mixed const &fds)
 
SelectclearWriteFds ()
 
SelectsetExceptSock (Socket const &sock)
 
SelectsetExceptFd (int fd)
 
SelectdelExceptFd (int fd)
 
SelectsetExceptFds (winux::Mixed const &fds)
 
SelectclearExceptFds ()
 
Selectclear ()
 清空所有fds 更多...
 
int wait (double sec=-1)
 等待相应的fd就绪。sec<1表示小于1秒的时间,sec<0表示无限等待。eg: sec=1.5表示等待1500ms 更多...
 
- Public 成员函数 继承自 eiennet::io::SelectRead
 SelectRead ()
 
 SelectRead (Socket const &sock)
 
 SelectRead (Socket const *sock)
 
 SelectRead (int fd)
 
 SelectRead (winux::Mixed const &fds)
 
 ~SelectRead ()
 
SelectReadsetReadSock (Socket const &sock)
 
SelectReadsetReadSock (Socket const *sock)
 
SelectReadsetReadFd (int fd)
 
SelectReaddelReadFd (int fd)
 
SelectReadsetReadFds (winux::Mixed const &fds)
 
SelectReadclear ()
 
int hasReadSock (Socket const &sock) const
 
int hasReadFd (int fd) const
 
int wait (double sec=-1)
 等待相应的fd就绪。sec<1表示小于1秒的时间,sec<0表示无限等待。eg: sec=1.5表示等待1500ms 更多...
 
- Public 成员函数 继承自 eiennet::io::SelectWrite
 SelectWrite ()
 
 SelectWrite (Socket const &sock)
 
 SelectWrite (Socket const *sock)
 
 SelectWrite (int fd)
 
 SelectWrite (winux::Mixed const &fds)
 
 ~SelectWrite ()
 
SelectWritesetWriteSock (Socket const &sock)
 
SelectWritesetWriteSock (Socket const *sock)
 
SelectWritesetWriteFd (int fd)
 
SelectWritedelWriteFd (int fd)
 
SelectWritesetWriteFds (winux::Mixed const &fds)
 
SelectWriteclear ()
 
int hasWriteSock (Socket const &sock) const
 
int hasWriteFd (int fd) const
 
int wait (double sec=-1)
 等待相应的fd就绪。sec<1表示小于1秒的时间,sec<0表示无限等待。eg: sec=1.5表示等待1500ms 更多...
 
- Public 成员函数 继承自 eiennet::io::SelectExcept
 SelectExcept ()
 
 SelectExcept (Socket const &sock)
 
 SelectExcept (Socket const *sock)
 
 SelectExcept (int fd)
 
 SelectExcept (winux::Mixed const &fds)
 
 ~SelectExcept ()
 
SelectExceptsetExceptSock (Socket const &sock)
 
SelectExceptsetExceptSock (Socket const *sock)
 
SelectExceptsetExceptFd (int fd)
 
SelectExceptdelExceptFd (int fd)
 
SelectExceptsetExceptFds (winux::Mixed const &fds)
 
SelectExceptclear ()
 
int hasExceptSock (Socket const &sock) const
 
int hasExceptFd (int fd) const
 
int wait (double sec=-1)
 等待相应的fd就绪。sec<1表示小于1秒的时间,sec<0表示无限等待。eg: sec=1.5表示等待1500ms 更多...
 

额外继承的成员函数

- Protected 属性 继承自 eiennet::io::SelectRead
winux::MembersWrapper< struct SelectRead_Data > _self
 
- Protected 属性 继承自 eiennet::io::SelectWrite
winux::MembersWrapper< struct SelectWrite_Data > _self
 
- Protected 属性 继承自 eiennet::io::SelectExcept
winux::MembersWrapper< struct SelectExcept_Data > _self
 

详细描述

Select Io模型

在文件 eiennet_socket.hpp916 行定义.

构造及析构函数说明

eiennet::io::Select::Select ( )
inline

Select模型构造函数

在文件 eiennet_socket.hpp920 行定义.

成员函数说明

Select& eiennet::io::Select::clear ( )
inline

清空所有fds

在文件 eiennet_socket.hpp941 行定义.

Select& eiennet::io::Select::clearExceptFds ( )
inline

在文件 eiennet_socket.hpp938 行定义.

Select& eiennet::io::Select::clearReadFds ( )
inline

在文件 eiennet_socket.hpp926 行定义.

Select& eiennet::io::Select::clearWriteFds ( )
inline

在文件 eiennet_socket.hpp932 行定义.

Select& eiennet::io::Select::delExceptFd ( int  fd)
inline

在文件 eiennet_socket.hpp936 行定义.

Select& eiennet::io::Select::delReadFd ( int  fd)
inline

在文件 eiennet_socket.hpp924 行定义.

Select& eiennet::io::Select::delWriteFd ( int  fd)
inline

在文件 eiennet_socket.hpp930 行定义.

Select& eiennet::io::Select::setExceptFd ( int  fd)
inline

在文件 eiennet_socket.hpp935 行定义.

Select& eiennet::io::Select::setExceptFds ( winux::Mixed const &  fds)
inline

在文件 eiennet_socket.hpp937 行定义.

Select& eiennet::io::Select::setExceptSock ( Socket const &  sock)
inline

在文件 eiennet_socket.hpp934 行定义.

Select& eiennet::io::Select::setReadFd ( int  fd)
inline

在文件 eiennet_socket.hpp923 行定义.

Select& eiennet::io::Select::setReadFds ( winux::Mixed const &  fds)
inline

在文件 eiennet_socket.hpp925 行定义.

Select& eiennet::io::Select::setReadSock ( Socket const &  sock)
inline

在文件 eiennet_socket.hpp922 行定义.

Select& eiennet::io::Select::setWriteFd ( int  fd)
inline

在文件 eiennet_socket.hpp929 行定义.

Select& eiennet::io::Select::setWriteFds ( winux::Mixed const &  fds)
inline

在文件 eiennet_socket.hpp931 行定义.

Select& eiennet::io::Select::setWriteSock ( Socket const &  sock)
inline

在文件 eiennet_socket.hpp928 行定义.

int eiennet::io::Select::wait ( double  sec = -1)

等待相应的fd就绪。sec<1表示小于1秒的时间,sec<0表示无限等待。eg: sec=1.5表示等待1500ms

若有fd就绪则返回就绪的fd的总数;若超时则返回0;若有错误发生则返回SOCKET_ERROR(-1)。
可用Socket::ErrNo()查看select()调用的错误,可用Socket::getError()查看select()无错时socket发生的错误。


该类的文档由以下文件生成: