RTI TCP Transport
Version 5.3.0
|
Configurable TCP Transport-Plugin properties. More...
Data Fields | |
struct NDDS_Transport_Property_t | parent |
Generic properties of all transport plugins. | |
RTI_INT32 | send_socket_buffer_size |
Size in bytes of the send buffer of a socket used for sending. | |
RTI_INT32 | recv_socket_buffer_size |
Size in bytes of the receive buffer of a socket used for receiving. | |
RTI_INT32 | ignore_loopback_interface |
Prevents the transport plugin from using the IP loopback interface. | |
RTI_INT32 | ignore_nonrunning_interfaces |
[DEPRECATED] Prevents the transport plugin from using a network interface that is not reported as RUNNING by the operating system. | |
RTI_INT32 | transport_priority_mask |
Mask for the transport priority field. | |
RTI_INT32 | transport_priority_mapping_low |
Sets the low value of the output range to IPv4 TOS. | |
RTI_INT32 | transport_priority_mapping_high |
Sets the high value of the output range to IPv4 TOS. | |
RTI_UINT32 | interface_poll_period |
Sets the interface polling period for detecting changes in the interfaces. Only used when using Transport TCP Plugin LAN mode (class-id NDDS_TRANSPORT_CLASSID_TCPV4_LAN). | |
RTI_INT32 | server_socket_backlog |
Determines what is the maximum length of the queue of pending connections. | |
NDDS_Transport_Address_t | public_address |
Public locator (IP address and port) of the transport instantiation. | |
char * | bind_interface_address |
Interface IP address for the transport sockets. | |
RTI_INT32 | server_bind_port |
Private IP port (inside the LAN) used by the transport to accept TCP connections. | |
struct TransportAllocationSettings_t | read_buffer_allocation |
Allocation settings applied to read buffers. | |
struct TransportAllocationSettings_t | write_buffer_allocation |
Allocation settings applied to buffers used for asynchronous (nonblocking) write. | |
struct TransportAllocationSettings_t | control_buffer_allocation |
Allocation settings applied to buffers used to serialize and send control messages. | |
struct TransportAllocationSettings_t | control_message_allocation |
Allocation settings applied to control messages. | |
struct TransportAllocationSettings_t | control_attribute_allocation |
Allocation settings applied to control messages attributes. | |
RTI_INT32 | force_asynchronous_send |
Controls whether the plugin will send data synchronously or asynchronously. | |
NDDS_Transport_TCPv4_OnConnectionEstablishedCallback | on_connection_established |
NDDS_Transport_TCPv4_OnConnectionLostCallback | on_connection_lost |
RTI_INT32 | max_packet_size |
The maximum size of a TCP segment. | |
RTI_INT32 | enable_keep_alive |
Configures the sending of KEEP_ALIVE messages in TCP. | |
RTI_INT32 | keep_alive_time |
Specifies the interval of inactivity in seconds that causes TCP to generate a KEEP_ALIVE message. | |
RTI_INT32 | keep_alive_interval |
Specifies the interval in seconds between KEEP_ALIVE retries. | |
RTI_INT32 | keep_alive_retry_count |
The maximum number of KEEP_ALIVE retries before dropping the connection. | |
RTI_INT32 | user_timeout |
struct NDDS_Transport_TCPv4_ConnectionLivelinessSettings_t | connection_liveliness_settings |
struct NDDS_Transport_TCPv4_EventThreadSettings_t | event_thread_settings |
RTI_INT32 | disable_nagle |
Disables the TCP nagle algorithm. | |
RTI_INT32 | logging_verbosity_bitmap |
Bitmap that specifies the verbosity of log messages from the transport. | |
RTI_INT32 | security_logging_verbosity_bitmap |
Bitmap that specifies the verbosity of log messages generated by OpenSSL. | |
NDDS_Transport_TCPv4_SocketMonitoringKind_t | socket_monitoring_kind |
Configures the socket monitoring API used by the transport. | |
struct NDDS_Transport_TCPv4_WindowsIOCPSettings_t | windows_iocp_settings |
Configures I/O completion ports when socket_monitoring_kind is set to NDDS_TRANSPORT_TCPV4_SOCKET_MONITORING_KIND_WINDOWS_IOCP. | |
RTI_INT32 | send_crc |
Tells the plugin to calculate and send the CRC32 for the TCP message payload. | |
RTI_INT32 | force_crc_check |
Tells the plugin to force the checking of the checksum. By default, the checksum will be checked only if present. | |
RTI_INT32 | outstanding_connection_cookies |
Maximum number of outstanding connection cookies allowed by the transport when acting as server. | |
RTI_INT32 | outstanding_connection_cookies_life_span |
Maximum lifespan (in seconds) of the cookies associated with pending connections. | |
RTI_INT32 | send_max_wait_sec |
Maximum number of seconds a low-level TCP sendto() function is allowed to block. | |
RTI_INT32 | server_connection_negotiation_timeout |
Timeout (in seconds) for negotiating a connection. | |
RTI_INT32 | initial_handshake_timeout |
Timeout (in seconds) for the initial handshake for a connection. | |
struct RTITLS_OpenSSL_Configuration | tls |
OpenSSL TLS parameters. | |
RTI_INT32 | disable_interface_tracking |
If this variable is set, the automatic change detection over the system network interfaces will be disabled. | |
Configurable TCP Transport-Plugin properties.
For communications within a LAN you should initialize the object as follows:
If you want to use the transport in WAN configuration, you must also define the public_address and sever_bind_port:
Remember that the public_address is the public address that your network gateway is exposing to a remote peer. It is not the local network address where the application is running.
struct NDDS_Transport_Property_t NDDS_Transport_TCPv4_Property_t::parent |
Generic properties of all transport plugins.
[default] Refer to the property default NDDS_Transport_TCPv4_Plugin::NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT_LAN
RTI_INT32 NDDS_Transport_TCPv4_Property_t::send_socket_buffer_size |
Size in bytes of the send buffer of a socket used for sending.
On most operating systems, setsockopt() will be called to set the SENDBUF to the value of this parameter.
This value must be greater than or equal to NDDS_Transport_Property_t::message_size_max or NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT.
The maximum value is operating system-dependent.
[default] NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT
RTI_INT32 NDDS_Transport_TCPv4_Property_t::recv_socket_buffer_size |
Size in bytes of the receive buffer of a socket used for receiving.
On most operating systems, setsockopt() will be called to set the RECVBUF to the value of this parameter.
This value must be greater than or equal to parent.message_size_max or NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT.
The maximum value is operating-system dependent.
[default] NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT
RTI_INT32 NDDS_Transport_TCPv4_Property_t::ignore_loopback_interface |
Prevents the transport plugin from using the IP loopback interface.
This property is ignored when parent.classid is equal to NDDS_TRANSPORT_CLASSID_TCPV4_WAN.
Two values are allowed:
[default] 1
RTI_INT32 NDDS_Transport_TCPv4_Property_t::ignore_nonrunning_interfaces |
[DEPRECATED] Prevents the transport plugin from using a network interface that is not reported as RUNNING by the operating system.
DEPRECATED: this property has no effect. Non-RUNNING Interfaces are ignored until they change their status to RUNNING, unless disable_interface_tracking is set to 1, in which case interfaces are ignored even if they change their status at a later point.
The transport checks the flags reported by the operating system for each network interface upon initialization. An interface which is not reported as UP will not be used. This property allows the same check to be extended to the IFF_RUNNING flag implemented by some operating systems. The RUNNING flag is defined to mean that "all resources are allocated" and may be off if no link is detected (e.g., the network cable is unplugged).
Two values are allowed:
[default] 0
RTI_INT32 NDDS_Transport_TCPv4_Property_t::transport_priority_mask |
Mask for the transport priority field.
This is used in conjunction with transport_priority_mapping_low and transport_priority_mapping_high to define the mapping from DDS transport priority (see TRANSPORT_PRIORITY) to the IPv4 TOS field. Defines a contiguous region of bits in the 32-bit transport priority value that is used to generate values for the IPv4 TOS field on an outgoing socket.
For example, the value 0x0000ff00 causes bits 9-16 (8 bits) to be used in the mapping. The value will be scaled from the mask range (0x0000 - 0xff00 in this case) to the range specified by low and high.
If the mask is set to zero, then the transport will not set IPv4 TOS for send sockets.
[default] 0
RTI_INT32 NDDS_Transport_TCPv4_Property_t::transport_priority_mapping_low |
Sets the low value of the output range to IPv4 TOS.
This is used in conjunction with transport_priority_mask and transport_priority_mapping_high to define the mapping from DDS transport priority to the IPv4 TOS field. Defines the low value of the output range for scaling.
Note that IPv4 TOS is generally an 8-bit value.
[default] 0
RTI_INT32 NDDS_Transport_TCPv4_Property_t::transport_priority_mapping_high |
Sets the high value of the output range to IPv4 TOS.
This is used in conjunction with transport_priority_mask and transport_priority_mapping_low to define the mapping from DDS transport priority to the IPv4 TOS field. Defines the high value of the output range for scaling.
Note that IPv4 TOS is generally an 8-bit value.
[default] 0xFF
RTI_UINT32 NDDS_Transport_TCPv4_Property_t::interface_poll_period |
Sets the interface polling period for detecting changes in the interfaces. Only used when using Transport TCP Plugin LAN mode (class-id NDDS_TRANSPORT_CLASSID_TCPV4_LAN).
See NDDS_Transport_UDPv4_Property_t::interface_poll_period for more details.
RTI_INT32 NDDS_Transport_TCPv4_Property_t::server_socket_backlog |
Determines what is the maximum length of the queue of pending connections.
[default] NDDS_TRANSPORT_TCPV4_SERVER_SOCKET_BACKLOG_DEFAULT
NDDS_Transport_Address_t NDDS_Transport_TCPv4_Property_t::public_address |
Public locator (IP address and port) of the transport instantiation.
Use the function NDDS_Transport_TCPv4_Plugin_stringToTransportAddress to compose the transport locator from a string form.
This field is used and required only when NDDS_Transport_Property_t::classid is set to NDDS_TRANSPORT_CLASSID_TCPV4_WAN.
The public IP address and port are necessary to support communication over WAN that involves Network Address Translators (NATs).
Typically, the address is the public address of the IP router that provides access to the WAN. The port is the IP router port that is used to reach the private server_bind_port inside the LAN from the outside.
[default] NDDS_TRANSPORT_ADDRESS_INVALID
char* NDDS_Transport_TCPv4_Property_t::bind_interface_address |
Interface IP address for the transport sockets.
The TCP transport can be configured to bind all sockets to a specified interface.
If the value is NULL, the sockets will be bound to the special IP address INADDR_ANY. This address allows the sockets to receive packets destined to any of the interfaces.
This field should be set in multi-homed systems communicating across NAT routers.
[default] NULL
RTI_INT32 NDDS_Transport_TCPv4_Property_t::server_bind_port |
Private IP port (inside the LAN) used by the transport to accept TCP connections.
If this property is set to zero, the transport will disable the internal server socket, making it impossible for external peers to connect to this node. In this case, the node is considered unreachable and will only communicate using the asymmetric mode with other (reachable) peers. For WAN communication, this port must be forwarded to a public port in the NAT-enabled router that connects to the outer network.
The server_bind_port cannot be shared among multiple participants on a common host. On most operating systems, attempting to reuse the same server_bind_port for multiple participants on a common host will result in a "port already in use" error. However, Windows systems will not recognize if the server_bind_port is already in use, and thus care must be taken to properly configure Windows systems.
\see NDDS_Transport_TCPv4_Property_t#public_address <B>[default]</B> \ref NDDS_TRANSPORT_TCPV4_DEFAULT_PORT_NUMBER
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::read_buffer_allocation |
Allocation settings applied to read buffers.
These settings configure the initial number of buffers, the maximum number of buffers and the buffers to be allocated when more buffers are needed.
[default] NDDS_TRANSPORT_TCPV4_READ_BUFFER_POOL_GROWTH_POLICY_DEFAULT
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::write_buffer_allocation |
Allocation settings applied to buffers used for asynchronous (nonblocking) write.
These settings configure the initial number of buffers, the maximum number of buffers and the buffers to be allocated when more buffers are needed.
Note that for the write buffer pool, the default max_count is not set to unlimited. This is to avoid having a fast writer quickly exhaust all the available system memory, in case of a temporary network slowdown. When this write buffer pool reaches the maximum, the low-level send command of the transport will fail; at that point RTI Connext will take the appropriate action (retry to send or drop it), according to the application's QoS (if the transport is used for reliable communication, the data will still be sent eventually).
[default] NDDS_TRANSPORT_TCPV4_WRITE_BUFFER_POOL_GROWTH_POLICY_DEFAULT
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::control_buffer_allocation |
Allocation settings applied to buffers used to serialize and send control messages.
These settings configure the initial number of buffers, the maximum number of buffers and the buffers to be allocated when more buffers are needed.
[default] NDDS_TRANSPORT_TCPV4_CONTROL_BUFFER_POOL_GROWTH_POLICY_DEFAULT
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::control_message_allocation |
Allocation settings applied to control messages.
These settings configure the initial number of buffers, the maximum number of buffers and the buffers to be allocated when more buffers are needed.
[default] NDDS_TRANSPORT_TCPV4_CONTROL_MESSAGE_FACTORY_GROWTH_POLICY_DEFAULT
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::control_attribute_allocation |
Allocation settings applied to control messages attributes.
These settings configure the initial number of attributes, the maximum number of attributes and the attributes to be allocated when more attributes are needed.
[default] NDDS_TRANSPORT_TCPV4_CONTROL_MESSAGE_ATTRIBUTE_FACTORY_GROWTH_POLICY_DEFAULT
RTI_INT32 NDDS_Transport_TCPv4_Property_t::force_asynchronous_send |
Controls whether the plugin will send data synchronously or asynchronously.
When this parameter is set to 0, the TCP transport will attempt to send data as soon as the internal send() function is called. When it is set to 1, the transport will make a copy of the data to send and enqueue it in an internal send buffer. Data will be sent as soon as the low-level socket buffer has space.
Normally setting it to 1 delivers better throughput in a fast network, but will result in a longer time to recover from various TCP error conditions. Setting it to 0 may cause the low-level send() function to block until the data is physically delivered to the lower socket buffer. For an application writing data at a very fast rate, it may cause the caller thread to block if the send socket buffer is full. This could produce lower throughput in those conditions (the caller thread could prepare the next packet while waiting for the send socket buffer to become available).
[default] 0 (synchronous send)
NDDS_Transport_TCPv4_OnConnectionEstablishedCallback NDDS_Transport_TCPv4_Property_t::on_connection_established |
Pointer to a function that is called whenever the plugin establish a connection with a remote peer.
For plugins configured to behave as servers, this function is called every time a remote client successfully establish a data communication.
For plugins configured to behave as clients, this function is called for every successful connection to a remote server.
It can be set to NULL (no notification callbacks are performed)
IMPORTANT: This function is called from the receive thread (both client/server side). if you don't return the control fast enough, the control protocol may be affected causing disconnections and/or delays in establishing connections with remote peers.
[default] NULL
NDDS_Transport_TCPv4_OnConnectionLostCallback NDDS_Transport_TCPv4_Property_t::on_connection_lost |
Pointer to a function that is called when a previously established connection with a remote peer gets closed.
It can be set to NULL (no notification callbacks are performed)
IMPORTANT: This function is called from the receive thread (both client/server side). if you don't return the control fast enough, the control protocol may be affected causing disconnections and/or delays in establishing connections with remote peers.
[default] NULL
RTI_INT32 NDDS_Transport_TCPv4_Property_t::max_packet_size |
The maximum size of a TCP segment.
This parameter is only supported on Linux architectures.
By default, the maximum size of a TCP segment is based on the network MTU for destinations on a local network, or on a default 576 for destinations on non-local networks. This behavior can be changed by setting this parameter to a value between 1 and 65535.
[default] -1 (use OS default)
RTI_INT32 NDDS_Transport_TCPv4_Property_t::enable_keep_alive |
Configures the sending of KEEP_ALIVE messages in TCP.
Setting this value to 1, causes a KEEP_ALIVE packet to be sent to the remote peer if a long time passes with no other data sent or received.
This feature is implemented only on architectures that provide a lowlevel implementation of the TCP keep-alive feature.
On Windows systems, the TCP keep-alive feature can be globally enabled through the system's registry: \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Tcpip\Parameters.
Refer to MSDN documentation for more details.
On Solaris systems, most of the TCP keep-alive parameters can be changed though the kernel properties.
[default] 0 (disabled)
RTI_INT32 NDDS_Transport_TCPv4_Property_t::keep_alive_time |
Specifies the interval of inactivity in seconds that causes TCP to generate a KEEP_ALIVE message.
This parameter is only supported on Linux architectures.
[default] -1 (OS default value)
RTI_INT32 NDDS_Transport_TCPv4_Property_t::keep_alive_interval |
Specifies the interval in seconds between KEEP_ALIVE retries.
This parameter is only supported on Linux architectures.
[default] -1 (OS default value)
RTI_INT32 NDDS_Transport_TCPv4_Property_t::keep_alive_retry_count |
The maximum number of KEEP_ALIVE retries before dropping the connection.
This parameter is only supported on Linux architectures.
[default] -1 (use system's default).
RTI_INT32 NDDS_Transport_TCPv4_Property_t::user_timeout |
Changes the default OS TCP User Timeout configuration. If set to a value greater than 0, it represents the TCP User Timeout in seconds.
Currently this feature is supported only on Linux 2.6.37 and above.
[default] 0 (use system's default).
struct NDDS_Transport_TCPv4_ConnectionLivelinessSettings_t NDDS_Transport_TCPv4_Property_t::connection_liveliness_settings |
Configuration for the liveliness mechanism for the control connection.
[default] NDDS_TRANSPORT_TCPV4_CONNECTION_LIVELINESS_SETTINGS_DEFAULT
struct NDDS_Transport_TCPv4_EventThreadSettings_t NDDS_Transport_TCPv4_Property_t::event_thread_settings |
Configuration for the TCPv4 Event Thread.
[default] NDDS_TRANSPORT_TCPV4_EVENT_THREAD_SETTINGS_DEFAULT
RTI_INT32 NDDS_Transport_TCPv4_Property_t::disable_nagle |
Disables the TCP nagle algorithm.
When this property is set to 1, TCP segments are always sent as soon as possible, which may result in poor network utilization.
[default] 0 (disabled)
RTI_INT32 NDDS_Transport_TCPv4_Property_t::logging_verbosity_bitmap |
Bitmap that specifies the verbosity of log messages from the transport.
Logging values:
You can combine these values by logically ORing them together. For example, 0x9F means all (errors, warnings, local, remote, period, and other).
Note: The logging verbosity is a global property shared across multiple instances of the TCP transport. If you create a new TCP Transport instance with logging_verbosity_bitmap different than -1, the change will affect all the other instances as well.
The default TCP transport verbosity is errors and warnings.
Note: The option of 0x80 (other) is used only for tracing the internal control protocol. Since the output is very verbose, this feature is enabled only in the debug version of the TCP Transport library.
[default] -1 (do not change default verbosity).
RTI_INT32 NDDS_Transport_TCPv4_Property_t::security_logging_verbosity_bitmap |
Bitmap that specifies the verbosity of log messages generated by OpenSSL.
Logging values:
You can combine these values by logically ORing them together.
[default] -1 (Inherit logging_verbosity_bitmap value)
NDDS_Transport_TCPv4_SocketMonitoringKind_t NDDS_Transport_TCPv4_Property_t::socket_monitoring_kind |
Configures the socket monitoring API used by the transport.
[default] NDDS_TRANSPORT_TCPV4_SOCKET_MONITORING_KIND_SELECT
struct NDDS_Transport_TCPv4_WindowsIOCPSettings_t NDDS_Transport_TCPv4_Property_t::windows_iocp_settings |
Configures I/O completion ports when socket_monitoring_kind is set to NDDS_TRANSPORT_TCPV4_SOCKET_MONITORING_KIND_WINDOWS_IOCP.
[default] NDDS_TRANSPORT_TCPV4_WINDOWS_IOCP_SETTINGS_DEFAULT
RTI_INT32 NDDS_Transport_TCPv4_Property_t::send_crc |
Tells the plugin to calculate and send the CRC32 for the TCP message payload.
[default] 0
RTI_INT32 NDDS_Transport_TCPv4_Property_t::force_crc_check |
Tells the plugin to force the checking of the checksum. By default, the checksum will be checked only if present.
[default] 0
RTI_INT32 NDDS_Transport_TCPv4_Property_t::outstanding_connection_cookies |
Maximum number of outstanding connection cookies allowed by the transport when acting as server.
A connection cookie is a token provided by a server to a client; it is used to establish a data connection. Until the data connection is established, the cookie cannot be reused by the server.
To avoid wasting memory, it is good practice to set a cap to the maximum number of connection cookies (pending connections).
When the maximum value is reached, a client will not be able to connect to the server until new cookies become available.
[default] 100
RTI_INT32 NDDS_Transport_TCPv4_Property_t::outstanding_connection_cookies_life_span |
Maximum lifespan (in seconds) of the cookies associated with pending connections.
If a client does not connect to the server before the lifespan of its cookie expires, it will have to request a new cookie.
Range: 1 second or higher, or -1.
[default] -1, which means an unlimited amount of time (effectively disabling the feature).
RTI_INT32 NDDS_Transport_TCPv4_Property_t::send_max_wait_sec |
Maximum number of seconds a low-level TCP sendto() function is allowed to block.
This property controls the maximum time (in seconds) the low level sendto() is allowed to block the caller thread when the TCP send buffer becomes full.
If the bandwidth used by the transport is limited, and the sender thread try to push data faster than the OS can handle, the low level sendto() function will block the caller until there is some room available on the queue.
By limiting this delay we eliminate possibility of deadlock and increase the response time of the internal DDS thread.
This property affects both CONTROL and DATA stream, and affect only SYNCHRONOUS send operations. Asynchronous send never blocks a send operation.
For synchronous send() this property limit the time the DDS sender thread can block for a send buffer full. If is too large, DDS not only won't be able to send more data, but it won't be able to receive any more data because of an internal resource mutex.
Setting this property to 0 cause the low level function to report an immediate failure if the TCP send buffer is full.
Setting this property to -1 cause the low level function to block forever until space becomes available in the TCP buffer
[default] 3 seconds.
RTI_INT32 NDDS_Transport_TCPv4_Property_t::server_connection_negotiation_timeout |
Timeout (in seconds) for negotiating a connection.
The TCP Transport Plugin requires some negotiation before sending data over an accepted connection. This property controls the maximum time (in seconds) the a connection can remain in progress. If the negotiation of a connection has not completed after the specified timeout, the connection will be closed. This way, the TCP Transport Plugin can restart the process of establishing and negotiating that connection.
Range: 1 second or higher.
[default] 10 seconds
RTI_INT32 NDDS_Transport_TCPv4_Property_t::initial_handshake_timeout |
Timeout (in seconds) for the initial handshake for a connection.
Some of the TCP Transport Plugin configurations (e.g., when using TLS over TCP) require to perform an initial handshake for each established connection. This property controls the maximum time (in seconds) the initial handshake for a connection can remain in progress. If the handshake has not completed after the specified timeout, the connection will be closed. This way, the TCP Transport Plugin can restart the process of establishing and handshaking that connection.
Range: 1 second or higher.
[default] 10 seconds
struct RTITLS_OpenSSL_Configuration NDDS_Transport_TCPv4_Property_t::tls |
OpenSSL TLS parameters.
[default] RTITLS_OpenSSL::RTITLS_OPENSSL_CONFIGURATION_DEFAULT
RTI_INT32 NDDS_Transport_TCPv4_Property_t::disable_interface_tracking |
If this variable is set, the automatic change detection over the system network interfaces will be disabled.
See NDDS_Transport_UDPv4_Property_t::disable_interface_tracking for more details.
[default] 0