net/SocketError: add syscall specific check functions

Fixes Windows compatibility.
This commit is contained in:
Max Kellermann
2021-01-21 22:04:14 +01:00
parent 2719f62feb
commit 9e2d09dabc
5 changed files with 76 additions and 9 deletions

View File

@@ -36,7 +36,7 @@ BufferedSocket::DirectRead(void *data, size_t length) noexcept
}
const auto code = GetSocketError();
if (IsSocketErrorAgain(code))
if (IsSocketErrorReceiveWouldBlock(code))
return 0;
if (IsSocketErrorClosed(code))