mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 10:21:21 +00:00
sys_net: add few socket options (#1874)
This commit is contained in:
parent
6705a6ecc9
commit
d4da0e052d
@ -193,7 +193,7 @@ namespace sys_net
|
||||
#endif
|
||||
{
|
||||
ERROR_CASE(EWOULDBLOCK);
|
||||
default: throw fmt::exception("Unknown/illegal socket error: %d" HERE, code);
|
||||
default: libnet.error("Unknown/illegal socket error: %d" HERE, code);
|
||||
}
|
||||
|
||||
if (name && result != SYS_NET_EWOULDBLOCK)
|
||||
@ -550,8 +550,18 @@ namespace sys_net
|
||||
ret = ::setsockopt(sock->s, SOL_SOCKET, SO_RCVLOWAT, (char*)&recvlowmark, sizeof(recvlowmark));
|
||||
break;
|
||||
}
|
||||
case OP_SO_USECRYPTO:
|
||||
{
|
||||
libnet.warning("Socket option OP_SO_USECRYPTO is unimplemented");
|
||||
break;
|
||||
}
|
||||
case OP_SO_USESIGNATURE:
|
||||
{
|
||||
libnet.warning("Socket option OP_SO_USESIGNATURE is unimplemented");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw EXCEPTION("Unknown socket option for Win32: 0x%x", optname);
|
||||
libnet.error("Unknown socket option for Win32: 0x%x", optname);
|
||||
}
|
||||
}
|
||||
else if (level == PROTO_IPPROTO_TCP)
|
||||
@ -572,7 +582,7 @@ namespace sys_net
|
||||
}
|
||||
|
||||
default:
|
||||
throw EXCEPTION("Unknown TCP option for Win32: 0x%x", optname);
|
||||
libnet.error("Unknown TCP option for Win32: 0x%x", optname);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -599,7 +609,7 @@ namespace sys_net
|
||||
}
|
||||
|
||||
default:
|
||||
throw EXCEPTION("Unknown socket option for Unix: 0x%x", optname);
|
||||
libnet.error("Unknown socket option for Unix: 0x%x", optname);
|
||||
}
|
||||
}
|
||||
else if (level == PROTO_IPPROTO_TCP)
|
||||
@ -621,7 +631,7 @@ namespace sys_net
|
||||
}
|
||||
|
||||
default:
|
||||
throw EXCEPTION("Unknown TCP option for Unix: 0x%x", optname);
|
||||
libnet.error("Unknown TCP option for Unix: 0x%x", optname);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -71,6 +71,16 @@ namespace sys_net
|
||||
OP_SO_TYPE = 0x1008,
|
||||
OP_SO_NBIO = 0x1100, // Non-blocking IO
|
||||
OP_SO_TPPOLICY = 0x1101,
|
||||
|
||||
OP_SO_REUSEADDR = 0x0004,
|
||||
OP_SO_KEEPALIVE = 0x0008,
|
||||
OP_SO_BROADCAST = 0x0020,
|
||||
OP_SO_LINGER = 0x0080,
|
||||
OP_SO_OOBINLINE = 0x0100,
|
||||
OP_SO_REUSEPORT = 0x0200,
|
||||
OP_SO_ONESBCAST = 0x0800,
|
||||
OP_SO_USECRYPTO = 0x1000,
|
||||
OP_SO_USESIGNATURE = 0x2000,
|
||||
};
|
||||
|
||||
// TCP options
|
||||
|
Loading…
x
Reference in New Issue
Block a user