Select Io模型
更多...
#include <eiennet_socket.hpp>
eiennet::io::Select::Select |
( |
| ) |
|
|
inline |
Select& eiennet::io::Select::clear |
( |
| ) |
|
|
inline |
Select& eiennet::io::Select::clearExceptFds |
( |
| ) |
|
|
inline |
Select& eiennet::io::Select::clearReadFds |
( |
| ) |
|
|
inline |
Select& eiennet::io::Select::clearWriteFds |
( |
| ) |
|
|
inline |
Select& eiennet::io::Select::delExceptFd |
( |
int |
fd | ) |
|
|
inline |
Select& eiennet::io::Select::delReadFd |
( |
int |
fd | ) |
|
|
inline |
Select& eiennet::io::Select::delWriteFd |
( |
int |
fd | ) |
|
|
inline |
Select& eiennet::io::Select::setExceptFd |
( |
int |
fd | ) |
|
|
inline |
Select& eiennet::io::Select::setExceptSock |
( |
Socket const & |
sock | ) |
|
|
inline |
Select& eiennet::io::Select::setReadFd |
( |
int |
fd | ) |
|
|
inline |
Select& eiennet::io::Select::setReadSock |
( |
Socket const & |
sock | ) |
|
|
inline |
Select& eiennet::io::Select::setWriteFd |
( |
int |
fd | ) |
|
|
inline |
Select& eiennet::io::Select::setWriteSock |
( |
Socket const & |
sock | ) |
|
|
inline |
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发生的错误。
该类的文档由以下文件生成: