Add broadcast socket option keeper

This commit is contained in:
Cri4Key
2026-09-11 20:54:05 +02:00
committed by Ani
parent 48cc1ac0a9
commit de9184f03c
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -138,6 +138,8 @@ protected:
// Socket options value keepers
// Non-blocking IO option
s32 so_nbio = 0;
// Broadcast option
s32 so_broadcast = 0;
// Error, only used for connection result for non blocking stream sockets
s32 so_error = 0;
// Unsupported option
@@ -219,6 +219,10 @@ s32 lv2_socket_p2p::setsockopt(s32 level, s32 optname, const std::vector<u8>& op
{
so_nbio = native_int;
}
else if (level == SYS_NET_SOL_SOCKET && optname == SYS_NET_SO_BROADCAST)
{
so_broadcast = native_int;
}
const u64 key = (static_cast<u64>(level) << 32) | static_cast<u64>(optname);
sockopt_cache cache{};