event/net/UdpListener: use IsSocketErrorReceiveWouldBlock()
This commit is contained in:
parent
8aa4227c0c
commit
2ba092711f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user