mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 00:53:02 -05:00
With SO_RCVTIMEO set, Winsock fails a receive that waits that long with WSAETIMEDOUT, which native_error turned into ETIMEDOUT (60). sceNetRecv, sceNetRecvfrom and sceNetRecvmsg on a datagram socket therefore failed with 0x8041013C on Windows, where FreeBSD's sbwait returns EWOULDBLOCK (35) to soreceive, Linux returns EAGAIN, and POSIX (XSH 2.10.16) requires EAGAIN or EWOULDBLOCK when no data was received. A datagram socket has no connection that can time out, so WSAETIMEDOUT there only means that the receive timeout the guest set has expired: report EAGAIN. Stream sockets keep ETIMEDOUT, since Winsock leaves a connection in an indeterminate state after a timeout; TechnicalDebt records that gap and the one for SO_SNDTIMEO.