From 05ebded24ed933710fee9ec28be01955aafd26ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20P=C3=A9rez?= <78275223+jepemi@users.noreply.github.com> Date: Wed, 6 Mar 2024 06:55:59 +0100 Subject: [PATCH] TCP first message loss (#699) * Refs #20508: Add wait_for_logical_port_negotiation_ms to transport descriptor Signed-off-by: Jesus Perez * Refs #20508: Reuse unused transport descriptor tcp_negotiation_timeout Signed-off-by: Jesus Perez --------- Signed-off-by: Jesus Perez --- docs/03-exports/aliases-api.include | 1 + docs/fastdds/transport/tcp/tcp.rst | 7 +++++++ docs/fastdds/xml_configuration/transports.rst | 3 +++ 3 files changed, 11 insertions(+) diff --git a/docs/03-exports/aliases-api.include b/docs/03-exports/aliases-api.include index ef42b1460..19eb546be 100644 --- a/docs/03-exports/aliases-api.include +++ b/docs/03-exports/aliases-api.include @@ -632,6 +632,7 @@ .. |TCPTransportDescriptor::keep_alive_thread-api| replace:: :cpp:var:`keep_alive_thread` .. |TCPTransportDescriptor::accept_thread-api| replace:: :cpp:var:`accept_thread` .. |TCPTransportDescriptor::tls_config-api| replace:: :cpp:var:`tls_config` +.. |TCPTransportDescriptor::tcp_negotiation_timeout-api| replace:: :cpp:var:`tcp_negotiation_timeout` .. |TCPTransportDescriptor::TLSConfig-api| replace:: :cpp:struct:`TLSConfig` .. |TCPTransportDescriptor::TLSConfig::add_verify_mode-api| replace:: :cpp:func:`add_verify_mode()` diff --git a/docs/fastdds/transport/tcp/tcp.rst b/docs/fastdds/transport/tcp/tcp.rst index 51645807f..432fdec9d 100644 --- a/docs/fastdds/transport/tcp/tcp.rst +++ b/docs/fastdds/transport/tcp/tcp.rst @@ -132,6 +132,13 @@ The following table describes the common data members for both TCPv4 and TCPv6. - |ThreadSettings| - - |ThreadSettings| for the threads processing incoming TCP connection requests. + * - |TCPTransportDescriptor::tcp_negotiation_timeout-api| + - ``uint32_t`` + - 0 + - Time to wait for logical port negotiation (in ms). If a logical port is under negotiation, it waits for the + negotiation to finish up to this timeout before trying to send a message to that port. Setting this option to + non-zero values increases the discovery time. Setting it to zero means no wait but could lead to loss of first + messages. .. warning:: diff --git a/docs/fastdds/xml_configuration/transports.rst b/docs/fastdds/xml_configuration/transports.rst index be3e39010..3982222d4 100644 --- a/docs/fastdds/xml_configuration/transports.rst +++ b/docs/fastdds/xml_configuration/transports.rst @@ -111,6 +111,9 @@ A more detailed explanation of each of these elements can be found in :ref:`comm | ```` | Socket option for disabling the Nagle |br| | ``bool`` | ``false``| | | algorithm. (**TCP only**). | | | +-------------------------------+----------------------------------------------------+----------------------+----------+ +| ```` | Time to wait for logical port negotiation (in ms) | ``uint32_t`` | ``0`` | +| | |br| (**TCP only**). | | | ++-------------------------------+----------------------------------------------------+----------------------+----------+ | ```` | Size (in bytes) of the shared-memory segment. |br| | ``uint32_t`` | 262144 | | | (Optional, **SHM only**). | | | +-------------------------------+----------------------------------------------------+----------------------+----------+