|
Medial Code Documentation
|
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 |
helper data structure to perform poll
|
inline |
Check if the descriptor is ready for read.
| fd | file descriptor to check status |
|
inline |
Check if the descriptor is ready for write.
| fd | file descriptor to check status |
|
inline |
perform poll on the set defined, read, write, exception
| timeout | specify timeout in milliseconds(ms) if negative, means poll will block |
|
inline |
add file descriptor to watch for exception
| fd | file descriptor to be watched |
|
inline |
add file descriptor to watch for read
| fd | file descriptor to be watched |
|
inline |
add file descriptor to watch for write
| fd | file descriptor to be watched |