RTI TCP Transport
Version 6.0.0
|
TCP Transport Plugin interfaces and definitions. More...
Data Structures | |
struct | NDDS_Transport_TCPv4_ConnectionLivelinessSettings_t |
Connection liveliness settings. More... | |
struct | NDDS_Transport_TCPv4_EventThreadSettings_t |
Event thread settings. More... | |
struct | NDDS_Transport_TCPv4_WindowsIOCPSettings_t |
Windows I/O completion ports settings. More... | |
struct | NDDS_Transport_TCPv4_Property_t |
Configurable TCP Transport-Plugin properties. More... | |
Macros | |
#define | NDDS_TRANSPORT_CLASSNAME_TCPV4_LAN "tcpv4_lan" |
IPv4 TCP/IP Transport-Plugin class name for LAN case. | |
#define | NDDS_TRANSPORT_CLASSNAME_TCPV4_WAN "tcpv4_wan" |
IPv4 TCP/IP Transport-Plugin class name for WAN case. | |
#define | NDDS_TRANSPORT_TCPV4_DEFAULT_PORT_NUMBER 7400 |
The default value for the server bind port. | |
#define | NDDS_TRANSPORT_TCPV4_MESSAGE_SIZE_MAX_DEFAULT (65536) |
Default value of maximum message size. | |
#define | NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT (-1) |
Used to specify that os default should be used for the socket buffer size. | |
#define | NDDS_TRANSPORT_TCPV4_SEND_SOCKET_BUFFER_SIZE_DEFAULT (131072) |
Default value of NDDS_Transport_Property_t::send_socket_buffer_size. | |
#define | NDDS_TRANSPORT_TCPV4_RECV_SOCKET_BUFFER_SIZE_DEFAULT (131072) |
Default value of NDDS_Transport_Property_t::recv_socket_buffer_size. | |
#define | NDDS_TRANSPORT_TCPV4_SERVER_SOCKET_BACKLOG_DEFAULT (5) |
The max number of pending connections waiting for the control thread to accept them. | |
#define | NDDS_TRANSPORT_TCPV4_ADDRESS_BIT_COUNT (64) |
Number of signficant bits of 16-byte address. | |
#define | NDDS_TRANSPORT_TCPV4_READ_BUFFER_POOL_GROWTH_POLICY_DEFAULT NDDS_TRANSPORT_ALLOCATION_SETTINGS_DEFAULT |
The default settings for the buffer pool used to provide memory for the received messages. | |
#define | NDDS_TRANSPORT_TCPV4_WRITE_BUFFER_POOL_GROWTH_POLICY_DEFAULT { 4L, 1000L, 10L} |
The default settings for the buffer used to provide memory for the bytes being written using asynchronous send. | |
#define | NDDS_TRANSPORT_TCPV4_CONTROL_BUFFER_POOL_GROWTH_POLICY_DEFAULT NDDS_TRANSPORT_ALLOCATION_SETTINGS_DEFAULT |
The default settings for the buffer pool used to provide memory for the control messages read or written. | |
#define | NDDS_TRANSPORT_TCPV4_CONTROL_MESSAGE_FACTORY_GROWTH_POLICY_DEFAULT NDDS_TRANSPORT_ALLOCATION_SETTINGS_DEFAULT |
The default settings for the buffer used to provide memory for the control message factory. | |
#define | NDDS_TRANSPORT_TCPV4_CONTROL_MESSAGE_ATTRIBUTE_FACTORY_GROWTH_POLICY_DEFAULT NDDS_TRANSPORT_ALLOCATION_SETTINGS_DEFAULT |
The default settings for the buffer used to provide memory for the control message attribute factory. | |
#define | NDDS_TRANSPORT_TCPV4_CONNECTION_LIVELINESS_SETTINGS_DEFAULT |
Use this to initialize a NDDS_Transport_TCPv4_ConnectionLivelinessSettings_t structure. | |
#define | NDDS_TRANSPORT_TCPV4_EVENT_THREAD_SETTINGS_DEFAULT |
Use this to initialize a NDDS_Transport_TCPv4_EventThreadSettings_t structure. | |
#define | NDDS_TRANSPORT_TCPV4_WINDOWS_IOCP_SETTINGS_DEFAULT |
Use this to initialize a NDDS_Transport_TCPv4_WindowsIOCPSettings_t structure. | |
#define | NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT_LAN |
Use this to initialize a NDDS_Transport_TCPv4_Property_t structure for LAN communication. | |
#define | NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT_LAN |
Use this to initialize a NDDS_Transport_TCPv4_Property_t structure. | |
#define | NDDS_TRANSPORT_TCPV4_ADDRESS_LOCALHOST {{0,0,0,0, 0,0,0,0, 0xff,0xff, 0x1c, 0xe8, 127,0,0,1}} |
The definition of localhost for the TCP transport: 127.0.0.1:7400. | |
Typedefs | |
typedef void(* | NDDS_Transport_TCPv4_OnConnectionEstablishedCallback )(RTI_UINT32 remote_peer_addresss, RTI_UINT16 remote_peer_port) |
Prototype of the function that can be called when a new connection is successfully established with a remote peer. | |
typedef void(* | NDDS_Transport_TCPv4_OnConnectionLostCallback )(RTI_UINT32 remote_peer_addresss, RTI_UINT16 remote_peer_port, NDDS_Transport_TCPv4_OnConnectionLost_ReasonCode_t reason) |
Prototype of the function that can be called when an existing connection is lost. | |
Enumerations | |
enum | NDDS_Transport_TCPv4_OnConnectionLost_ReasonCode_t { NDDS_TRANSPORT_TCPV4_ON_CONNECTION_LOST_REASON_UNKNOWN = 0, NDDS_TRANSPORT_TCPV4_ON_CONNECTION_LOST_REASON_CODE_FINALIZED, NDDS_TRANSPORT_TCPV4_ON_CONNECTION_LOST_REASON_CODE_BROKEN_PIPE, NDDS_TRANSPORT_TCPV4_ON_CONNECTION_LOST_REASON_DESTROYED } |
A set of possible reasons why a connection is lost. More... | |
enum | NDDS_Transport_TCPv4_SocketMonitoringKind_t { NDDS_TRANSPORT_TCPV4_SOCKET_MONITORING_KIND_WINDOWS_WAITFORMULTIPLEOBJECTS = 0, NDDS_TRANSPORT_TCPV4_SOCKET_MONITORING_KIND_SELECT = 1, NDDS_TRANSPORT_TCPV4_SOCKET_MONITORING_KIND_WINDOWS_IOCP = 2 } |
Possible values for the socket monitoring API. More... | |
Functions | |
NDDS_Transport_Plugin * | NDDS_Transport_TCPv4_new (const struct NDDS_Transport_TCPv4_Property_t *property_in) |
Creates an instance of the TCP transport plugin and initializes it from the specified TCP transport property structure. | |
NDDS_Transport_Plugin * | NDDS_Transport_TCPv4_create (NDDS_Transport_Address_t *default_network_address_out, const struct DDS_PropertyQosPolicy *property_in) |
Creates an instance of a TCP Transport Plugin, using PropertyQosPolicy. | |
RTIBool | NDDS_Transport_TCPv4_Plugin_stringToTransportAddress (NDDS_Transport_Address_t *address_out, const char *address_in, RTIBool acceptHostName_in) |
Converts a string into a transport address suitable to be used with the TCP transport. | |
TCP Transport Plugin interfaces and definitions.
#define NDDS_TRANSPORT_CLASSNAME_TCPV4_LAN "tcpv4_lan" |
IPv4 TCP/IP Transport-Plugin class name for LAN case.
#define NDDS_TRANSPORT_CLASSNAME_TCPV4_WAN "tcpv4_wan" |
IPv4 TCP/IP Transport-Plugin class name for WAN case.
#define NDDS_TRANSPORT_TCPV4_DEFAULT_PORT_NUMBER 7400 |
The default value for the server bind port.
#define NDDS_TRANSPORT_TCPV4_MESSAGE_SIZE_MAX_DEFAULT (65536) |
Default value of maximum message size.
#define NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT (-1) |
Used to specify that os default should be used for the socket buffer size.
#define NDDS_TRANSPORT_TCPV4_SEND_SOCKET_BUFFER_SIZE_DEFAULT (131072) |
Default value of NDDS_Transport_Property_t::send_socket_buffer_size.
#define NDDS_TRANSPORT_TCPV4_RECV_SOCKET_BUFFER_SIZE_DEFAULT (131072) |
Default value of NDDS_Transport_Property_t::recv_socket_buffer_size.
#define NDDS_TRANSPORT_TCPV4_SERVER_SOCKET_BACKLOG_DEFAULT (5) |
The max number of pending connections waiting for the control thread to accept them.
#define NDDS_TRANSPORT_TCPV4_ADDRESS_BIT_COUNT (64) |
Number of signficant bits of 16-byte address.
#define NDDS_TRANSPORT_TCPV4_READ_BUFFER_POOL_GROWTH_POLICY_DEFAULT NDDS_TRANSPORT_ALLOCATION_SETTINGS_DEFAULT |
The default settings for the buffer pool used to provide memory for the received messages.
#define NDDS_TRANSPORT_TCPV4_WRITE_BUFFER_POOL_GROWTH_POLICY_DEFAULT { 4L, 1000L, 10L} |
The default settings for the buffer used to provide memory for the bytes being written using asynchronous send.
#define NDDS_TRANSPORT_TCPV4_CONTROL_BUFFER_POOL_GROWTH_POLICY_DEFAULT NDDS_TRANSPORT_ALLOCATION_SETTINGS_DEFAULT |
The default settings for the buffer pool used to provide memory for the control messages read or written.
#define NDDS_TRANSPORT_TCPV4_CONTROL_MESSAGE_FACTORY_GROWTH_POLICY_DEFAULT NDDS_TRANSPORT_ALLOCATION_SETTINGS_DEFAULT |
The default settings for the buffer used to provide memory for the control message factory.
#define NDDS_TRANSPORT_TCPV4_CONTROL_MESSAGE_ATTRIBUTE_FACTORY_GROWTH_POLICY_DEFAULT NDDS_TRANSPORT_ALLOCATION_SETTINGS_DEFAULT |
The default settings for the buffer used to provide memory for the control message attribute factory.
#define NDDS_TRANSPORT_TCPV4_CONNECTION_LIVELINESS_SETTINGS_DEFAULT |
Use this to initialize a NDDS_Transport_TCPv4_ConnectionLivelinessSettings_t structure.
#define NDDS_TRANSPORT_TCPV4_EVENT_THREAD_SETTINGS_DEFAULT |
Use this to initialize a NDDS_Transport_TCPv4_EventThreadSettings_t structure.
#define NDDS_TRANSPORT_TCPV4_WINDOWS_IOCP_SETTINGS_DEFAULT |
Use this to initialize a NDDS_Transport_TCPv4_WindowsIOCPSettings_t structure.
#define NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT_LAN |
Use this to initialize a NDDS_Transport_TCPv4_Property_t structure for LAN communication.
#define NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT_LAN |
Use this to initialize a NDDS_Transport_TCPv4_Property_t structure.
#define NDDS_TRANSPORT_TCPV4_ADDRESS_LOCALHOST {{0,0,0,0, 0,0,0,0, 0xff,0xff, 0x1c, 0xe8, 127,0,0,1}} |
The definition of localhost for the TCP transport: 127.0.0.1:7400.
typedef void(* NDDS_Transport_TCPv4_OnConnectionEstablishedCallback)(RTI_UINT32 remote_peer_addresss, RTI_UINT16 remote_peer_port) |
Prototype of the function that can be called when a new connection is successfully established with a remote peer.
remote_peer_addresss | the address of the remote peer connected encoded as network-ordered IPv4 address. |
remote_peer_port | the port number of the remote connection encoded as network-ordered 16-bit value |
typedef void(* NDDS_Transport_TCPv4_OnConnectionLostCallback)(RTI_UINT32 remote_peer_addresss, RTI_UINT16 remote_peer_port, NDDS_Transport_TCPv4_OnConnectionLost_ReasonCode_t reason) |
Prototype of the function that can be called when an existing connection is lost.
This method is always called after the on_connection_established is called.
It is also called if a sendresource or recvresource is destroyed (after closing the existing connections), and on shutdown
remote_peer_addresss | the address of the remote peer connected encoded as network-ordered IPv4 address. |
remote_peer_port | the port number of the remote connection encoded as network-ordered 16-bit value |
reason | an enumeration that describes the reason of the disconnection |
A set of possible reasons why a connection is lost.
Possible values for the socket monitoring API.
The socket monitoring API is configured using the property socket_monitoring_kind
NDDS_Transport_Plugin* NDDS_Transport_TCPv4_new | ( | const struct NDDS_Transport_TCPv4_Property_t * | property_in | ) |
Creates an instance of the TCP transport plugin and initializes it from the specified TCP transport property structure.
This is the main initializer of the TCP transport plugin. To use the default settings, pass a pointer to a struct NDDS_Transport_TCPv4_Property_t initialized with the macro NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT.
property_in | <<in>> A pointer to a struct NDDS_Transport_TCPv4_Property_t containing the transport property. The plugin will make a copy of this structure before returning (caller can safely destroy the object). |
NDDS_Transport_Plugin* NDDS_Transport_TCPv4_create | ( | NDDS_Transport_Address_t * | default_network_address_out, |
const struct DDS_PropertyQosPolicy * | property_in | ||
) |
Creates an instance of a TCP Transport Plugin, using PropertyQosPolicy.
For all the properties that are not specified, the default value is assumed (as described in Configure TCP Transport with Property QoS Policy).
default_network_address_out | <<out>> Unused parameter |
property_in | <<in>> The DDS_PropertyQoSPolicy object containing the transport properties. |
RTIBool NDDS_Transport_TCPv4_Plugin_stringToTransportAddress | ( | NDDS_Transport_Address_t * | address_out, |
const char * | address_in, | ||
RTIBool | acceptHostName_in | ||
) |
Converts a string into a transport address suitable to be used with the TCP transport.
This method will convert a string in the form host:port into a NDDS_Transport_Address_t structure.
If the 'port' component is not specified, it will assign the default value as described by the constant NDDS_TRANSPORT_TCPV4_DEFAULT_PORT_NUMBER.
address_out | <<out>> Transport address to initialize |
address_in | <<in>> the NULL-terminated string containing the address to parse |
acceptHostName_in | <<in>> Set it to RTI_TRUE to allow this function to resolve the host component of the string address through a DNS lookup; set it to RTI_FALSE to allow only IPv4 addresses in the 'host' part of the address string. |