mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 16:32:39 +00:00
correct socketoption struct and added ORBIS_NET_SO_SNDTIMEO
This commit is contained in:
parent
4558bac959
commit
885182c1d3
@ -59,22 +59,23 @@ enum OrbisNetSocketOption : u32 {
|
|||||||
ORBIS_NET_SO_KEEPALIVE = 0x00000008,
|
ORBIS_NET_SO_KEEPALIVE = 0x00000008,
|
||||||
ORBIS_NET_SO_BROADCAST = 0x00000020,
|
ORBIS_NET_SO_BROADCAST = 0x00000020,
|
||||||
ORBIS_NET_SO_LINGER = 0x00000080,
|
ORBIS_NET_SO_LINGER = 0x00000080,
|
||||||
ORBIS_NET_SO_OOBINLINE = 0x00000100,
|
|
||||||
ORBIS_NET_SO_REUSEPORT = 0x00000200,
|
ORBIS_NET_SO_REUSEPORT = 0x00000200,
|
||||||
ORBIS_NET_SO_ONESBCAST = 0x00000800,
|
ORBIS_NET_SO_ONESBCAST = 0x00010000,
|
||||||
ORBIS_NET_SO_USECRYPTO = 0x00001000,
|
ORBIS_NET_SO_USECRYPTO = 0x00020000,
|
||||||
ORBIS_NET_SO_USESIGNATURE = 0x00002000,
|
ORBIS_NET_SO_USESIGNATURE = 0x00040000,
|
||||||
ORBIS_NET_SO_SNDBUF = 0x1001,
|
ORBIS_NET_SO_SNDBUF = 0x1001,
|
||||||
ORBIS_NET_SO_RCVBUF = 0x1002,
|
ORBIS_NET_SO_RCVBUF = 0x1002,
|
||||||
ORBIS_NET_SO_SNDLOWAT = 0x1003,
|
|
||||||
ORBIS_NET_SO_RCVLOWAT = 0x1004,
|
|
||||||
ORBIS_NET_SO_SNDTIMEO = 0x1005,
|
|
||||||
ORBIS_NET_SO_RCVTIMEO = 0x1006,
|
|
||||||
ORBIS_NET_SO_ERROR = 0x1007,
|
ORBIS_NET_SO_ERROR = 0x1007,
|
||||||
ORBIS_NET_SO_TYPE = 0x1008,
|
ORBIS_NET_SO_TYPE = 0x1008,
|
||||||
ORBIS_NET_SO_NBIO = 0x1100,
|
ORBIS_NET_SO_SNDTIMEO = 0x1105,
|
||||||
ORBIS_NET_SO_TPPOLICY = 0x1101,
|
ORBIS_NET_SO_RCVTIMEO = 0x1106,
|
||||||
ORBIS_NET_SO_NAME = 0x1102
|
ORBIS_NET_SO_ERROR_EX = 0x1107,
|
||||||
|
ORBIS_NET_SO_ACCEPTTIMEO = 0x1108,
|
||||||
|
ORBIS_NET_SO_CONNECTTIMEO = 0x1109,
|
||||||
|
ORBIS_NET_SO_NBIO = 0x1200,
|
||||||
|
ORBIS_NET_SO_POLICY = 0x1201,
|
||||||
|
ORBIS_NET_SO_NAME = 0x1202,
|
||||||
|
ORBIS_NET_SO_PRIORITY = 0x1203
|
||||||
};
|
};
|
||||||
|
|
||||||
struct OrbisNetSockaddr {
|
struct OrbisNetSockaddr {
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
// net errno codes
|
// net errno codes
|
||||||
|
|
||||||
constexpr int ORBIS_NET_EBADF = 9;
|
constexpr int ORBIS_NET_EBADF = 9;
|
||||||
|
constexpr int ORBIS_NET_EFAULT = 14;
|
||||||
|
|
||||||
// error codes
|
// error codes
|
||||||
constexpr int ORBIS_NET_ERROR_EBADF = 0x80410109;
|
constexpr int ORBIS_NET_ERROR_EBADF = 0x80410109;
|
||||||
|
constexpr int ORBIS_NET_ERROR_EFAULT = 0x8041010e;
|
||||||
|
@ -48,6 +48,9 @@ int PosixSocket::SetSocketOptions(int level, int optname, const void* optval, un
|
|||||||
case ORBIS_NET_SO_BROADCAST:
|
case ORBIS_NET_SO_BROADCAST:
|
||||||
return ConvertReturnErrorCode(
|
return ConvertReturnErrorCode(
|
||||||
setsockopt(sock, level, SO_BROADCAST, (const char*)optval, optlen));
|
setsockopt(sock, level, SO_BROADCAST, (const char*)optval, optlen));
|
||||||
|
case ORBIS_NET_SO_SNDTIMEO:
|
||||||
|
return ConvertReturnErrorCode(
|
||||||
|
setsockopt(sock, level, SO_SNDTIMEO, (const char*)optval, optlen));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UNREACHABLE_MSG("Unknown level ={} optname ={}", level, optname);
|
UNREACHABLE_MSG("Unknown level ={} optname ={}", level, optname);
|
||||||
|
Loading…
Reference in New Issue
Block a user