[XAM/Net] Added unified method of returning WSA error codes
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user