faio
faio 公共 C++ 接口参考
载入中...
搜索中...
未找到
faio::io::Ready类 参考

资源就绪观察结果。 更多...

Public 成员函数

bool is_readable () const noexcept
 检查是否观察到读就绪。
bool is_writable () const noexcept
 检查是否观察到写就绪。
bool is_error () const noexcept
 检查是否观察到错误提示。
bool is_read_closed () const noexcept
 检查读方向是否已关闭。
bool is_write_closed () const noexcept
 检查写方向是否已关闭。

详细描述

资源就绪观察结果。

公共头文件
#include <faio/net/tcp.hpp>
注解
就绪只是提示;仍需通过非阻塞操作判断实际能否读取或写入。

成员函数说明

◆ is_readable()

bool faio::io::Ready::is_readable ( ) const
noexcept

检查是否观察到读就绪。

返回
返回 bool。

◆ is_writable()

bool faio::io::Ready::is_writable ( ) const
noexcept

检查是否观察到写就绪。

返回
返回 bool。

◆ is_error()

bool faio::io::Ready::is_error ( ) const
noexcept

检查是否观察到错误提示。

返回
返回 bool;错误细节需通过实际 I/O 或 take_error 查询。

◆ is_read_closed()

bool faio::io::Ready::is_read_closed ( ) const
noexcept

检查读方向是否已关闭。

返回
返回 bool;实际 read 仍可能先返回未消费的数据。

◆ is_write_closed()

bool faio::io::Ready::is_write_closed ( ) const
noexcept

检查写方向是否已关闭。

返回
返回 bool。