9 #ifndef anna_comm_internal_Poll_hpp 10 #define anna_comm_internal_Poll_hpp 33 Poll() : a_ptrTimeout(NULL), a_minfd(INT_MAX), a_maxfd(0) {
42 bool isEmpty()
const {
return a_pollr <= 0; }
43 void clear() { a_maxfd = 0; a_minfd = INT_MAX; FD_ZERO(&a_fdmask); FD_ZERO(&a_fdset);}
44 void insert(
const int fd) ;
45 void erase(
const int fd) ;
50 timeval* a_ptrTimeout;
57 static int select(
const int maxfd, fd_set* fdset, timeval* timeout)
62 result = ::select(maxfd + 1, fdset, NULL, NULL, timeout);
63 }
while(result == -1 && errno == EINTR);
void setTimeout(const Millisecond &timeout)
Definition: Millisecond.hpp:24
void waitMessage() noexcept(false)
void insert(const int fd)
void clear()
Definition: Poll.hpp:43
bool isEmpty() const
Definition: Poll.hpp:42
Poll()
Definition: Poll.hpp:33
#define ANNA_FILE_LOCATION
Definition: defines.hpp:23
Definition: RuntimeException.hpp:23