diff --git a/src/net/SocketError.hxx b/src/net/SocketError.hxx index 3e98f4de3..d6171e807 100644 --- a/src/net/SocketError.hxx +++ b/src/net/SocketError.hxx @@ -191,6 +191,14 @@ SocketErrorCategory() noexcept #endif } +[[gnu::pure]] +static inline bool +IsSocketErrorReceiveWouldBlock(const std::system_error &e) noexcept +{ + return e.code().category() == SocketErrorCategory() && + IsSocketErrorReceiveWouldBlock(e.code().value()); +} + [[gnu::pure]] static inline auto MakeSocketError(socket_error_t code, const char *msg) noexcept