@@ -48,3 +48,49 @@ Please refer to :ref:`dds_layer_domainParticipantQos` for more information about
4848 (please refer to :ref: `remotelocatorsallocationattributes `).
4949 It is recommended to use the highest number of local addresses found on all the systems belonging to the same
5050 domain.
51+
52+ .. _tcp-keep-alive :
53+
54+ TCP Keep Alive |Pro |
55+ --------------------
56+
57+ Fast DDS Pro additionally provides a TCP keep-alive mechanism to detect stalled TCP connections and recover
58+ from link failures more reliably.
59+ When enabled, the TCP transport periodically sends keep-alive requests on established TCP channels, and monitors
60+ activity to determine whether a connection is still responsive.
61+ Keep alive requests are sent only when no incoming data has been received for a specified interval.
62+
63+ If the configured timeout is reached without observing activity after a keep-alive request, the channel is
64+ considered broken and is closed, allowing Fast DDS to reconnect and restore communication.
65+
66+ Note that this feature operates at the application level, independently of any TCP keep-alive settings at the OS level.
67+ This allows for more fine-grained control over connection monitoring and recovery within Fast DDS.
68+ It also ensures consistent behavior across different operating systems and increases portability.
69+
70+ Keep alive is disabled by default and can be configured through the following parameters in
71+ |TCPTransportDescriptor-api |:
72+
73+ .. tab-set ::
74+
75+ .. tab-item :: XML
76+ :sync: xml
77+
78+ .. literalinclude :: /../code/XMLTester.xml
79+ :language: xml
80+ :start-after: <!-->CONF-TCP-KEEP-ALIVE<-->
81+ :end-before: <!--><-->
82+ :lines: 2-3, 6-
83+ :append: </profiles>
84+
85+ .. tab-item :: C++
86+ :sync: cpp
87+
88+ .. literalinclude :: ../../../../code/DDSCodeTester.cpp
89+ :language: c++
90+ :dedent: 8
91+ :start-after: //CONF-TCP-KEEP-ALIVE
92+ :end-before: //!
93+
94+ .. note ::
95+
96+ This feature is intended for TCP transports and only applies to connected TCP channels.
0 commit comments