| xgboost | 
| 命名空间 | |
| 详细信息 | |
| 类 | |
| 结构 | 结果 | 
| 一种比抛出 dmlc 异常更容易处理的错误类型。我们可以记录和传播系统错误代码。 更多... | |
| 类 | SockAddrV6 | 
| 类 | SockAddrV4 | 
| 类 | SockAddress | 
| TCP 套接字地址,可以是 IPv4 或 IPv6。更多... | |
| 类 | TCPSocket | 
| 用于简单通信的 TCP 套接字。更多... | |
| 枚举 | |
| 枚举类 | SockDomain : std::int32_t { kV4 = AF_INET , kV6 = AF_INET6 } | 
| 函数 | |
| 结果 | operator+ (Result &&lhs, Result &&rhs) | 
| auto | Success () noexcept(true) | 
| 返回成功。更多... | |
| auto | Fail (std::string msg, char const *file=__builtin_FILE(), std::int32_t line=__builtin_LINE()) | 
| 返回失败。更多... | |
| auto | Fail (std::string msg, std::error_code errc, char const *file=__builtin_FILE(), std::int32_t line=__builtin_LINE()) | 
| 返回带 errno的失败。更多... | |
| auto | Fail (std::string msg, Result &&prev, char const *file=__builtin_FILE(), std::int32_t line=__builtin_LINE()) | 
| 返回带前一个错误的失败。更多... | |
| auto | Fail (std::string msg, std::error_code errc, Result &&prev, char const *file=__builtin_FILE(), std::int32_t line=__builtin_LINE()) | 
| 返回带前一个错误和新 errno的失败。更多... | |
| template<typename Fn > | |
| std::enable_if_t< std::is_invocable_v< Fn >, Result > | operator<< (Result &&r, Fn &&fn) | 
| void | SafeColl (Result const &rc, char const *file=__builtin_FILE(), std::int32_t line=__builtin_LINE()) | 
| SockAddress | MakeSockAddress (StringView host, in_port_t port) | 
| 解析主机地址并返回 SockAddress 实例。支持 IPv4 和 IPv6 主机。更多... | |
| 结果 | Connect (xgboost::StringView host, std::int32_t port, std::int32_t retry, std::chrono::seconds timeout, xgboost::collective::TCPSocket *out_conn) | 
| 连接到远程地址,如果失败则返回错误代码。更多... | |
| 结果 | GetHostName (std::string *p_out) | 
| 获取本地主机名。更多... | |
| template<typename H > | |
| 结果 | INetNToP (H const &host, std::string *p_out) | 
| inet_ntop 更多... | |
版权所有 2023-2024, XGBoost 贡献者
| 
 | 强 | 
| Result xgboost::collective::Connect | ( | xgboost::StringView | host, | 
| std::int32_t | port, | ||
| std::int32_t | retry, | ||
| std::chrono::seconds | timeout, | ||
| xgboost::collective::TCPSocket * | out_conn | ||
| ) | 
连接到远程地址,如果失败则返回错误代码。
| host | 主机 IP 地址。 | 
| port | 连接端口。 | 
| retry | 尝试重试的次数。 | 
| timeout | 每次连接尝试的超时时间。 | 
| out_conn | 如果连接成功,则为输出套接字。Value 在连接失败时无效且未定义。 | 
| 
 | inline | 
返回失败。
| 
 | inline | 
返回带前一个错误的失败。
| 
 | inline | 
返回带 errno 的失败。
| 
 | inline | 
返回带前一个错误和新 errno 的失败。
| Result xgboost::collective::GetHostName | ( | std::string * | p_out | ) | 
获取本地主机名。
| Result xgboost::collective::INetNToP | ( | H const & | host, | 
| std::string * | p_out | ||
| ) | 
inet_ntop
| SockAddress xgboost::collective::MakeSockAddress | ( | StringView | host, | 
| in_port_t | port | ||
| ) | 
解析主机地址并返回 SockAddress 实例。支持 IPv4 和 IPv6 主机。
| std::enable_if_t<std::is_invocable_v<Fn>, Result> xgboost::collective::operator<< | ( | 结果 && | r, | 
| Fn && | fn | ||
| ) | 
| void xgboost::collective::SafeColl | ( | Result const & | rc, | 
| char const * | 文件 = __builtin_FILE(), | ||
| std::int32_t | 行 = __builtin_LINE() | ||
| ) | 
| 
 | inlinenoexcept | 
返回成功。