History log of /libuv/src/unix/tcp.c (Results 1 – 25 of 91)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# fedfa989 03-Jun-2024 Andy Pan

tcpkeepalive: distinguish OS versions and use proper time units

---------

Signed-off-by: Andy Pan <i@andypan.me>


# ba24986f 20-Jun-2024 Andy Pan

unix: support SO_REUSEPORT with load balancing for UDP (#4419)

Signed-off-by: Andy Pan <i@andypan.me>


# d2d92b74 21-May-2024 Andy Pan

unix: support SO_REUSEPORT with load balancing for TCP


# ab3ecf65 19-May-2024 Andy Pan

unix: use the presence of SOCK_* instead of OS macros for socketpair

---------

Signed-off-by: Andy Pan <i@andypan.me>


# 6adeeace 22-Mar-2024 Saúl Ibarra Corretgé

unix,win: error on zero delay tcp keepalive

Closes: https://github.com/libuv/libuv/pull/4350
Closes: https://github.com/libuv/libuv/issues/3487


# fa6745b4 12-Mar-2024 Andy Pan

sunos: sync tcp keep-alive with other unices (#4337)


# a7cbda92 12-Jan-2024 Andy Pan

unix: optimize uv__tcp_keepalive cpp directives (#4275)

Reduce the amount of code being compiled and trim trailing whitespace in
passing.


# a9381cdb 06-Jan-2024 Andy Pan

unix: support full TCP keep-alive on Solaris (#4272)

Solaris claimed it supported the TCP-Alives mechanism,
but TCP_KEEPIDLE, TCP_KEEPINTVL, and TCP_KEEPCNT were not
available on Sol

unix: support full TCP keep-alive on Solaris (#4272)

Solaris claimed it supported the TCP-Alives mechanism,
but TCP_KEEPIDLE, TCP_KEEPINTVL, and TCP_KEEPCNT were not
available on Solaris until the latest version 11.4.
Therefore, we need to simulate the TCP-Alives mechanism on
other platforms via TCP_KEEPALIVE_THRESHOLD + TCP_KEEPALIVE_ABORT_THRESHOLD.

show more ...


# 8861a97e 22-Dec-2023 Abdirahim Musse <33973272+abmusse@users.noreply.github.com>

aix,ibmi: use uv_interface_addresses instead of getifaddrs (#4222)

AIX and IBM i don't have getifaddrs but we do have code in
`uv_interface_addresses` to get the interface addresses.

aix,ibmi: use uv_interface_addresses instead of getifaddrs (#4222)

AIX and IBM i don't have getifaddrs but we do have code in
`uv_interface_addresses` to get the interface addresses.

Refs: https://github.com/libuv/libuv/issues/4117

show more ...


# bfbe4e38 18-Nov-2023 Abdirahim Musse <33973272+abmusse@users.noreply.github.com>

aix: disable ipv6 link local (#4229)

AIX does not implement ifaddrs and when retrieving the network
interfaces with uv_interface_addresses there was a test failure in
tcp_connect6_li

aix: disable ipv6 link local (#4229)

AIX does not implement ifaddrs and when retrieving the network
interfaces with uv_interface_addresses there was a test failure in
tcp_connect6_link_local.

For now disable ipv6 link local on aix to:

1) fix broken aix build
2) stop blocking libuv upgrade in node

Refs: https://github.com/libuv/libuv/pull/4222#issuecomment-1812962233
Refs: https://github.com/nodejs/node/pull/50650

show more ...


# 31e4b90c 14-Nov-2023 Stephen Gallagher

unix: ignore ifaddrs with NULL ifa_addr (#4218)

Passing this to uv__is_ipv6_link_local() is causing a segmentation
fault. Note that the documentation for getifaddrs() explicitly states

unix: ignore ifaddrs with NULL ifa_addr (#4218)

Passing this to uv__is_ipv6_link_local() is causing a segmentation
fault. Note that the documentation for getifaddrs() explicitly states
that this value may be NULL.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

show more ...


# d83fadaf 28-Sep-2023 Abdirahim Musse <33973272+abmusse@users.noreply.github.com>

ibmi: implement ifaddrs, getifaddrs, freeifaddrs (#4155)

Add PASE implementation of ifaddrs, getifaddrs, freeifaddrs.

Refs: https://github.com/libuv/libuv/issues/4117


# 65541f77 14-Aug-2023 小明 <7737673+caobug@users.noreply.github.com>

darwin: make TCP_KEEPINTVL and TCP_KEEPCNT available (#3908)

In earlier versions, macOS only defined TCP_KEEPALIVE, but since macOS
10.8 (Mountain Lion), it has supported TCP_KEEPINTVL a

darwin: make TCP_KEEPINTVL and TCP_KEEPCNT available (#3908)

In earlier versions, macOS only defined TCP_KEEPALIVE, but since macOS
10.8 (Mountain Lion), it has supported TCP_KEEPINTVL and TCP_KEEPCNT.

https://lists.apple.com/archives/macnetworkprog/2012/Jul/msg00005.html

show more ...


# e893cd68 03-Aug-2023 Ben Noordhuis

unix: set ipv6 scope id for link-local addresses (#4107)

Link-local addresses (prefix fe80::/64) don't route unless you specify
the network interface to use so make libuv do that.

unix: set ipv6 scope id for link-local addresses (#4107)

Link-local addresses (prefix fe80::/64) don't route unless you specify
the network interface to use so make libuv do that.

Fixes: https://github.com/nodejs/node/issues/48846

show more ...


# 1b01b786 24-May-2023 Ben Noordhuis

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings are false
positives, let's use them as the impetus to switch to a type-safer and
arguably cleaner approach.

Fixes: https://github.com/libuv/libuv/issues/4019

show more ...


# 62c2374a 07-Feb-2023 Jameson Nash

unix: DRY and fix tcp bind error path (#3904)

The conditional bind-to-port logic in tcp.c had an error path that
closed the socket file descriptor while it was still owned by the
uv_

unix: DRY and fix tcp bind error path (#3904)

The conditional bind-to-port logic in tcp.c had an error path that
closed the socket file descriptor while it was still owned by the
uv_tcp_t handle.

Fix that by not closing the file descriptor and refactoring the code so
it is hopefully harder to get wrong in the future.

The refactoring also makes the code a little flatter, removes duplicated
code, and, arguably, is in a more idiomatic libuv style.

Fixes: https://github.com/libuv/libuv/issues/3461
Replaces: https://github.com/libuv/libuv/pull/3462
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>

show more ...


# 7bccb562 03-Aug-2022 Santiago Gimeno

unix,win: remove UV_HANDLE_SHUTTING flag (#3705)

Replace it with a `uv__is_stream_shutting()` macro that checks the
`shutdown_req` field.

It partially fixes: https://github.com/

unix,win: remove UV_HANDLE_SHUTTING flag (#3705)

Replace it with a `uv__is_stream_shutting()` macro that checks the
`shutdown_req` field.

It partially fixes: https://github.com/libuv/libuv/issues/3663.

show more ...


# 6c692ad1 20-Jul-2022 Ben Noordhuis

unix: don't accept() connections in a loop (#3696)

After analysis of many real-world programs I've come to conclude that
accepting in a loop is nearly always suboptimal.

1. 99.9

unix: don't accept() connections in a loop (#3696)

After analysis of many real-world programs I've come to conclude that
accepting in a loop is nearly always suboptimal.

1. 99.9% of the time the second accept() call fails with EAGAIN, meaning
there are no additional connections to accept. Not super expensive
in isolation but it adds up.

2. When there are more connections to accept but the listen socket is
shared between multiple processes (ex. the Node.js cluster module),
libuv's greedy behavior necessitated the UV_TCP_SINGLE_ACCEPT hack
to slow it down in order to give other processes a chance.

Accepting a single connection and relying on level-triggered polling to
get notified on the next incoming connection both simplifies the code
and optimizes for the common case.

show more ...


# f5e4d85c 11-Jul-2022 Stacey Marshall

unix,tcp: allow EINVAL errno from setsockopt in uv_tcp_close_reset() (#3662)

Some setsockopt() implememantations may return with errno of EINVAL
when the socket has been shut down alread

unix,tcp: allow EINVAL errno from setsockopt in uv_tcp_close_reset() (#3662)

Some setsockopt() implememantations may return with errno of EINVAL
when the socket has been shut down already, as documented in the
Open Group Specifications Issue 7, 2018.

When this happens, reset errno and continue to mark the socket closed
and handle any callback.

show more ...


# 21083093 29-Jun-2022 Samuel Cabrero

unix,tcp: fix errno handling in uv__tcp_bind() (#3652)

The errno value is only meaningful if bind() fails and returns -1.

Some bind() implementations may return success but modify e

unix,tcp: fix errno handling in uv__tcp_bind() (#3652)

The errno value is only meaningful if bind() fails and returns -1.

Some bind() implementations may return success but modify errno value
internally, like the socket_wrapper library used by the Samba testsuite.

show more ...


# d54c92e3 15-Feb-2022 Jameson Nash

win: fix style nits [NFC] (#3474)

Internal functions usually have a uv__ prefix.


Revision tags: v1.41.0
# 4ddc2927 10-Nov-2020 Jameson Nash

stream: add uv_pipe and uv_socketpair to the API

Equivalents of `pipe` and `socketpair` for cross-platform use.

PR-URL: https://github.com/libuv/libuv/pull/2953
Reviewed-By: San

stream: add uv_pipe and uv_socketpair to the API

Equivalents of `pipe` and `socketpair` for cross-platform use.

PR-URL: https://github.com/libuv/libuv/pull/2953
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...


Revision tags: v1.40.0, v1.39.0, v1.38.1, v1.38.0
# 726af5eb 28-Apr-2020 Ben Noordhuis

unix: report bind error in uv_tcp_connect()

Fix a bug where libuv forgets about EADDRINUSE errors reported earlier:
uv_tcp_bind() + uv_tcp_connect() seemingly succeed but the socket isn'

unix: report bind error in uv_tcp_connect()

Fix a bug where libuv forgets about EADDRINUSE errors reported earlier:
uv_tcp_bind() + uv_tcp_connect() seemingly succeed but the socket isn't
actually bound to the requested address.

This bug goes back to at least 2011 if indeed it ever worked at all.

PR-URL: https://github.com/libuv/libuv/pull/2218
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


# c70dd705 16-Jun-2020 Ben Noordhuis

unix: use relaxed loads/stores for feature checks

Make ThreadSanitizer stop complaining about the static variables that
libuv uses to record the presence (or lack) of system calls and ot

unix: use relaxed loads/stores for feature checks

Make ThreadSanitizer stop complaining about the static variables that
libuv uses to record the presence (or lack) of system calls and other
kernel features.

Fixes: https://github.com/libuv/libuv/issues/2884
PR-URL: https://github.com/libuv/libuv/pull/2886
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


Revision tags: v1.37.0, v1.36.0, v1.35.0
# 21aff3b4 04-Feb-2020 Manuel BACHMANN

unix: make uv_tcp_keepalive predictable

Current UNIX systems define various defaults for
TCP_KEEPINTVL and TCP_KEEPCNT, which makes the time
between TCP_KEEPIDLE delay is reached and

unix: make uv_tcp_keepalive predictable

Current UNIX systems define various defaults for
TCP_KEEPINTVL and TCP_KEEPCNT, which makes the time
between TCP_KEEPIDLE delay is reached and timeout
effectively occurs unpredictable (Linux: /proc/sys
/net/ipv4/tcp_keepalive_intvl;tcp_keepalive_probes).

Do the following: set TCP_KEEPINTVL to 1 second (same
as Win32 default) and TCP_KEEPCNT to 10 times (same
as Win32 hardcoded value).

Fixes: https://github.com/libuv/libuv/issues/2664
PR-URL: https://github.com/libuv/libuv/pull/2669
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

1234