xgboost
Public Member Functions | Public Attributes | List of all members
rabit::utils::PollHelper Struct Reference

helper data structure to perform poll More...

#include <poll_utils.h>

Collaboration diagram for rabit::utils::PollHelper:
Collaboration graph

Public Member Functions

void WatchRead (SOCKET fd)
 add file descriptor to watch for read More...
 
void WatchRead (xgboost::collective::TCPSocket const &socket)
 
void WatchWrite (SOCKET fd)
 add file descriptor to watch for write More...
 
void WatchWrite (xgboost::collective::TCPSocket const &socket)
 
void WatchException (SOCKET fd)
 add file descriptor to watch for exception More...
 
void WatchException (xgboost::collective::TCPSocket const &socket)
 
bool CheckRead (SOCKET fd) const
 Check if the descriptor is ready for read. More...
 
bool CheckRead (xgboost::collective::TCPSocket const &socket) const
 
bool CheckWrite (SOCKET fd) const
 Check if the descriptor is ready for write. More...
 
bool CheckWrite (xgboost::collective::TCPSocket const &socket) const
 
xgboost::collective::Result Poll (std::chrono::seconds timeout, bool check_error=true)
 perform poll on the set defined, read, write, exception More...
 

Public Attributes

std::unordered_map< SOCKET, pollfd > fds
 

Detailed Description

helper data structure to perform poll

Member Function Documentation

◆ CheckRead() [1/2]

bool rabit::utils::PollHelper::CheckRead ( SOCKET  fd) const
inline

Check if the descriptor is ready for read.

Parameters
fdfile descriptor to check status

◆ CheckRead() [2/2]

bool rabit::utils::PollHelper::CheckRead ( xgboost::collective::TCPSocket const &  socket) const
inline

◆ CheckWrite() [1/2]

bool rabit::utils::PollHelper::CheckWrite ( SOCKET  fd) const
inline

Check if the descriptor is ready for write.

Parameters
fdfile descriptor to check status

◆ CheckWrite() [2/2]

bool rabit::utils::PollHelper::CheckWrite ( xgboost::collective::TCPSocket const &  socket) const
inline

◆ Poll()

xgboost::collective::Result rabit::utils::PollHelper::Poll ( std::chrono::seconds  timeout,
bool  check_error = true 
)
inline

perform poll on the set defined, read, write, exception

Parameters
timeoutspecify timeout in seconds. Block if negative.

◆ WatchException() [1/2]

void rabit::utils::PollHelper::WatchException ( SOCKET  fd)
inline

add file descriptor to watch for exception

Parameters
fdfile descriptor to be watched

◆ WatchException() [2/2]

void rabit::utils::PollHelper::WatchException ( xgboost::collective::TCPSocket const &  socket)
inline

◆ WatchRead() [1/2]

void rabit::utils::PollHelper::WatchRead ( SOCKET  fd)
inline

add file descriptor to watch for read

Parameters
fdfile descriptor to be watched

◆ WatchRead() [2/2]

void rabit::utils::PollHelper::WatchRead ( xgboost::collective::TCPSocket const &  socket)
inline

◆ WatchWrite() [1/2]

void rabit::utils::PollHelper::WatchWrite ( SOCKET  fd)
inline

add file descriptor to watch for write

Parameters
fdfile descriptor to be watched

◆ WatchWrite() [2/2]

void rabit::utils::PollHelper::WatchWrite ( xgboost::collective::TCPSocket const &  socket)
inline

Member Data Documentation

◆ fds

std::unordered_map<SOCKET, pollfd> rabit::utils::PollHelper::fds

The documentation for this struct was generated from the following file: