net/SocketError: move check to IsSocketError()
This commit is contained in:
parent
7b938b4d14
commit
432bfa15f4
|
@ -165,11 +165,18 @@ SocketErrorCategory() noexcept
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[gnu::pure]]
|
||||||
|
static inline bool
|
||||||
|
IsSocketError(const std::system_error &e) noexcept
|
||||||
|
{
|
||||||
|
return e.code().category() == SocketErrorCategory();
|
||||||
|
}
|
||||||
|
|
||||||
[[gnu::pure]]
|
[[gnu::pure]]
|
||||||
static inline bool
|
static inline bool
|
||||||
IsSocketErrorReceiveWouldBlock(const std::system_error &e) noexcept
|
IsSocketErrorReceiveWouldBlock(const std::system_error &e) noexcept
|
||||||
{
|
{
|
||||||
return e.code().category() == SocketErrorCategory() &&
|
return IsSocketError(e) &&
|
||||||
IsSocketErrorReceiveWouldBlock(e.code().value());
|
IsSocketErrorReceiveWouldBlock(e.code().value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue