Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
rabit::utils::PollHelper Struct Reference

helper data structure to perform poll More...

#include <socket.h>

Public Member Functions

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

Data Fields

std::unordered_map< SOCKET, pollfd > fds
 

Detailed Description

helper data structure to perform poll

Member Function Documentation

◆ CheckRead()

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

Check if the descriptor is ready for read.

Parameters
fdfile descriptor to check status

◆ CheckWrite()

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

Check if the descriptor is ready for write.

Parameters
fdfile descriptor to check status

◆ Poll()

void rabit::utils::PollHelper::Poll ( std::chrono::seconds  timeout)
inline

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

Parameters
timeoutspecify timeout in milliseconds(ms) if negative, means poll will block
Returns

◆ WatchException()

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

add file descriptor to watch for exception

Parameters
fdfile descriptor to be watched

◆ WatchRead()

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

add file descriptor to watch for read

Parameters
fdfile descriptor to be watched

◆ WatchWrite()

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

add file descriptor to watch for write

Parameters
fdfile descriptor to be watched

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