File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -796,6 +796,17 @@ void dds_domain_examples()
796796 " unicast" );
797797 // !--
798798 }
799+
800+ {
801+ // DDS-TCP-NON-BLOCKING-SEND
802+ DomainParticipantQos participant_qos;
803+
804+ // TCP transport will use non-blocking send
805+ participant_qos.properties ().properties ().emplace_back (
806+ " fastdds.tcp_transport.non_blocking_send" ,
807+ " true" );
808+ // !--
809+ }
799810}
800811
801812// DOMAINPARTICIPANTLISTENER-DISCOVERY-CALLBACKS
Original file line number Diff line number Diff line change 38833883-->
38843884<!-- ><-->
38853885
3886+ <!-- >XML-TCP-NON-BLOCKING-SEND<-->
3887+ <participant profile_name =" participant_xml_conf_tcp_non_blocking_send" >
3888+ <rtps >
3889+ <propertiesPolicy >
3890+ <properties >
3891+ <property >
3892+ <name >fastdds.tcp_transport.non_blocking_send</name >
3893+ <value >true</value >
3894+ </property >
3895+ </properties >
3896+ </propertiesPolicy >
3897+ </rtps >
3898+ </participant >
3899+ <!-- ><-->
3900+
38863901<!-- >LARGE_DATA_BUILTIN_TRANSPORTS<-->
38873902<!--
38883903<?xml version="1.0" encoding="UTF-8" ?>
Original file line number Diff line number Diff line change @@ -351,3 +351,47 @@ The behavior regarding this can be configured using the property ``fastdds.shm.e
351351 :language: xml
352352 :start-after: <!-->XML-SHM-ENFORCE-META-TRAFFIC
353353 :end-before: <!--><-->
354+
355+ .. _property_policies_tcp_non_blocking_send :
356+
357+ TCP Non-blocking send
358+ ^^^^^^^^^^^^^^^^^^^^^
359+
360+ TCP transport will by default configure a :ref: `transport_tcp_tcp ` with blocking send calls.
361+ When ``fastdds.tcp_transport.non_blocking_send `` property is set to ``true ``, send operations will
362+ return immediately if the send buffer is full, but no error will be returned to the upper layer.
363+ This means that the application will behave as if the packet is sent and lost.
364+
365+ When set to ``false ``, send operations will block until the network buffer has space for the
366+ packet.
367+
368+ .. list-table ::
369+ :header-rows: 1
370+ :align: left
371+
372+ * - PropertyPolicyQos value
373+ - Description
374+ - Default
375+ * - ``"false" ``
376+ - Block on send operations when send buffer is full.
377+ - ✅
378+ * - ``"true" ``
379+ - Do not block on send operations when send buffer is full.
380+ -
381+
382+ .. tabs ::
383+
384+ .. tab :: C++
385+
386+ .. literalinclude :: /../code/DDSCodeTester.cpp
387+ :language: c++
388+ :start-after: //DDS-TCP-NON-BLOCKING-SEND
389+ :end-before: //!--
390+ :dedent: 8
391+
392+ .. tab :: XML
393+
394+ .. literalinclude :: /../code/XMLTester.xml
395+ :language: xml
396+ :start-after: <!-->XML-TCP-NON-BLOCKING-SEND
397+ :end-before: <!--><-->
Original file line number Diff line number Diff line change @@ -347,6 +347,3 @@ A TCP version of helloworld example can be found in the
347347`HelloWorldExampleTCP folder <https://github.com/eProsima/Fast-DDS/tree/master/examples/C%2B%2B/DDS/HelloWorldExampleTCP >`_.
348348It shows a publisher and a subscriber that communicate through TCP.
349349The publisher is configured as *TCP server * while the Subscriber is acting as *TCP client *.
350-
351-
352-
You can’t perform that action at this time.
0 commit comments