mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
openbsd: disable HIGH_RELIABLITY socket option
https://github.com/warmcat/libwebsockets/issues/3204
This commit is contained in:
parent
154bf55441
commit
57a0c16aeb
1 changed files with 13 additions and 7 deletions
|
@ -191,21 +191,23 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd, int unix_skt)
|
|||
}
|
||||
|
||||
static const int ip_opt_lws_flags[] = {
|
||||
LCCSCF_IP_LOW_LATENCY, LCCSCF_IP_HIGH_THROUGHPUT,
|
||||
LCCSCF_IP_HIGH_RELIABILITY
|
||||
#if !defined(__OpenBSD__)
|
||||
LCCSCF_IP_LOW_LATENCY, LCCSCF_IP_HIGH_THROUGHPUT
|
||||
#if !defined(__OpenBSD__) && !defined(__sun) && !defined(__QNX__)
|
||||
, LCCSCF_IP_HIGH_RELIABILITY
|
||||
, LCCSCF_IP_LOW_COST
|
||||
#endif
|
||||
}, ip_opt_val[] = {
|
||||
IPTOS_LOWDELAY, IPTOS_THROUGHPUT, IPTOS_RELIABILITY
|
||||
IPTOS_LOWDELAY, IPTOS_THROUGHPUT
|
||||
#if !defined(__OpenBSD__) && !defined(__sun) && !defined(__QNX__)
|
||||
, IPTOS_RELIABILITY
|
||||
, IPTOS_MINCOST
|
||||
#endif
|
||||
};
|
||||
#if !defined(LWS_WITH_NO_LOGS)
|
||||
static const char *ip_opt_names[] = {
|
||||
"LOWDELAY", "THROUGHPUT", "RELIABILITY"
|
||||
#if !defined(__OpenBSD__) && !defined(__sun)
|
||||
"LOWDELAY", "THROUGHPUT"
|
||||
#if !defined(__OpenBSD__) && !defined(__sun) && !defined(__QNX__)
|
||||
, "RELIABILITY"
|
||||
, "MINCOST"
|
||||
#endif
|
||||
};
|
||||
|
@ -255,7 +257,10 @@ lws_plat_set_socket_options_ip(lws_sockfd_type fd, uint8_t pri, int lws_flags)
|
|||
}
|
||||
#endif
|
||||
|
||||
for (n = 0; n < 4; n++) {
|
||||
|
||||
#if !defined(__NuttX__)
|
||||
/* array size differs by platform */
|
||||
for (n = 0; n < (int)LWS_ARRAY_SIZE(ip_opt_lws_flags); n++) {
|
||||
if (!(lws_flags & ip_opt_lws_flags[n]))
|
||||
continue;
|
||||
|
||||
|
@ -272,6 +277,7 @@ lws_plat_set_socket_options_ip(lws_sockfd_type fd, uint8_t pri, int lws_flags)
|
|||
lwsl_notice("%s: set ip flag %s\n", __func__,
|
||||
ip_opt_names[n]);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue