fastdo
0.6.8
|
SelectRead Io模型 更多...
#include <eiennet_socket.hpp>
Public 成员函数 | |
SelectRead () | |
SelectRead (Socket const &sock) | |
SelectRead (Socket const *sock) | |
SelectRead (int fd) | |
SelectRead (winux::Mixed const &fds) | |
~SelectRead () | |
SelectRead & | setReadSock (Socket const &sock) |
SelectRead & | setReadSock (Socket const *sock) |
SelectRead & | setReadFd (int fd) |
SelectRead & | delReadFd (int fd) |
SelectRead & | setReadFds (winux::Mixed const &fds) |
SelectRead & | clear () |
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 更多... | |
Protected 属性 | |
winux::MembersWrapper< struct SelectRead_Data > | _self |
SelectRead Io模型
在文件 eiennet_socket.hpp 第 826 行定义.
eiennet::io::SelectRead::SelectRead | ( | ) |
eiennet::io::SelectRead::SelectRead | ( | Socket const & | sock | ) |
eiennet::io::SelectRead::SelectRead | ( | Socket const * | sock | ) |
eiennet::io::SelectRead::SelectRead | ( | int | fd | ) |
eiennet::io::SelectRead::SelectRead | ( | winux::Mixed const & | fds | ) |
eiennet::io::SelectRead::~SelectRead | ( | ) |
SelectRead& eiennet::io::SelectRead::clear | ( | ) |
SelectRead& eiennet::io::SelectRead::delReadFd | ( | int | fd | ) |
int eiennet::io::SelectRead::hasReadFd | ( | int | fd | ) | const |
|
inline |
SelectRead& eiennet::io::SelectRead::setReadFd | ( | int | fd | ) |
SelectRead& eiennet::io::SelectRead::setReadFds | ( | winux::Mixed const & | fds | ) |
|
inline |
|
inline |
int eiennet::io::SelectRead::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发生的错误。
|
protected |
在文件 eiennet_socket.hpp 第 851 行定义.