[XAM/Net] Added unified method of returning WSA error codes

This commit is contained in:
Gliniak
2021-11-17 13:05:24 +01:00
parent 0b90d5edf9
commit d4e5ecb93b
3 changed files with 19 additions and 20 deletions

View File

@@ -269,5 +269,14 @@ X_STATUS XSocket::GetSockName(uint8_t* buf, int* buf_len) {
return X_STATUS_SUCCESS;
}
uint32_t XSocket::GetLastWSAError() const {
// Todo(Gliniak): Provide error mapping table
// Xbox error codes might not match with what we receive from OS
#ifdef XE_PLATFORM_WIN32
return WSAGetLastError();
#endif
return errno;
}
} // namespace kernel
} // namespace xe