Set TCP_USER_TIMEOUT to cap (ms) how long TCP will wait for ACKs on in-flight data
before aborting the connection; prevents stuck/half-open sessions and
enables faster failover vs default retransmission timeouts.
Co-authored-by: David Carlier <devnexen@gmail.com>
close GH-20708
UDP segmentation offload is an optimisation attempt by sending multiple
large enough datagrams over UDP which reduces syscalls as by default,
they have to be broke down in small UDP packets, it is better if the
hardware supports it, other handed down to the software implementation.
close GH-18213
To possibly reduce the latency when polling packets by activating it
from the network interface for N microseconds.
The kernel by doing so, increase the CPU(s) activity bound to
the socket significantly.
Note that not only the kernel needs to have support enabled for it
(which the average distribution usually does) but the network
interface itself needs to support it too. If not, it is just a no-op.
- `TCP_FUNCTION_ALIAS`: fetches the function pointer name alias (>= 14.0
only tough).
- `TCP_BBR_ALGORITHM`: set/get the underlying algorithm (0: netflix, 1:
google) when the BBR's TCP stack is used.
- `TCP_REUSPORT_LB_NUMA`: set/get a NUMA domain filter on the socket.
close GH-16923
Allows to select an alternate TCP stack. For example with RACK,
a fast loss detection relying on timestamp per packet.
While it works system-wide, it can also apply in an individual socket level too.
close GH-16842
Is to create socket for Internet Control Message Protocol context.
Due to their nature, they are meant to be used via
raw sockets rather than TCP/UDP.
close GH-16737
targetted for socket_create_pair/socket_create, they re not considered
as socket type but to be ORed with these (to avoid socketpair2/socket2
likely), set O_CLOEXEC/O_NONBLOCK respectively on the file descriptors.
close GH-15322
AIX 7.1 has SOCK_CONN_DGRAM, but not SOCK_DCCP; the previous change
conflated the availability between the two definitions. Add an
additional #ifdef for this.
* Replace WIN32 conditions with _WIN32 or PHP_WIN32
WIN32 is defined by the SDK and not defined all the time on Windows by
compilers or the environment. _WIN32 is defined as 1 when the
compilation target is 32-bit ARM, 64-bit ARM, x86, or x64. Otherwise,
undefined.
This syncs these usages one step further.
Upstream libgd has replaced WIN32 with _WIN32 via
c60d9fe577
PHP_WIN32 is added to ext/sockets/sockets.stub.php as done in other
*.stub.php files at this point.
* Use PHP_WIN32 in ext/random
* Use PHP_WIN32 in ext/sockets
* Use _WIN32 in xxhash.h as done upstream
See https://github.com/Cyan4973/xxHash/pull/931
* Update end comment with PHP_WIN32
going from 128 to system's SOMAXCONN by default to be able to increase
the queue of connections to be handled.
Also, for Haiku SOMAXCONN is only 32.
Close GH-13854
Useful to control how many SYN packets the client will send to the
server before giving up establishing a connection if the server does
not respond (usually 5 or 6 by default).
Close GH-13816
The preprocessor macros defined in some header can be checked, using
Autoconf's AC_COMPILE_IFELSE, or with simpler AC_CHECK_DECL(S), or even
better and simpler directly in the C code.
Allow to bind a socket to a divert port without being concerned
by its address. for ipfw filter purpose (SO_USER_COOKIE constant).
FreeBSD only.
Close GH-10415.
having tigher control on ACK delays, difference is the setting
is `volatile` as it can be turned off by the kernel if not set
explicitally set otherwise on the socket.
Closes GH-10145.
to be used in conjunction with SO_REUSPORT, giving a greater control
over how we bind a socket instead of the round robin workflow, we do
instead attach to the processor id as :
- we assign the processor_id to A in the BPF filter.
- then returns A.
in other words, a more modern version of SO_INCOMING_CPU (ie can have a per
worker notion we do not use here).
Closes#8062
In preparation for generating method signatures for the manual.
This change gets rid of bogus false|null return types, a few unnecessary trailing backslashes, and settles on using ? when possible for nullable types.