OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <TcpInst.h>
Public Member Functions | |
virtual int | load (ACE_Configuration_Heap &cf, ACE_Configuration_Section_Key §) |
virtual OPENDDS_STRING | dump_to_str () const |
Diagnostic aid. More... | |
bool | is_reliable () const |
Does the transport as configured support RELIABLE_RELIABILITY_QOS? More... | |
const std::string & | get_public_address () const |
virtual size_t | populate_locator (OpenDDS::DCPS::TransportLocator &trans_info, ConnectionInfoFlags flags) const |
Populate a transport locator sequence. Return the number of "locators.". More... | |
OPENDDS_STRING | local_address_string () const |
ACE_INET_Addr | local_address () const |
void | local_address (const ACE_INET_Addr &addr) |
void | local_address (const char *str) |
void | local_address (u_short port_number, const char *host_name) |
void | local_address_set_port (u_short port_number) |
![]() | |
const OPENDDS_STRING & | name () const |
void | dump () const |
Diagnostic aid. More... | |
virtual bool | requires_cdr_encapsulation () const |
Does the transport require a CDR-encapsulated data payload? More... | |
DCPS::WeakRcHandle< ICE::Endpoint > | get_ice_endpoint () |
void | rtps_relay_only_now (bool flag) |
void | use_rtps_relay_now (bool flag) |
void | use_ice_now (bool flag) |
virtual void | update_locators (const GUID_t &, const TransportLocatorSeq &) |
virtual void | get_last_recv_locator (const GUID_t &, TransportLocator &) |
virtual void | rtps_relay_address_change () |
ReactorTask_rch | reactor_task () |
EventDispatcher_rch | event_dispatcher () |
void | count_messages (bool flag) |
bool | count_messages () const |
virtual void | append_transport_statistics (TransportStatisticsSequence &) |
void | drop_messages (bool flag) |
void | drop_messages_m (double m) |
void | drop_messages_b (double b) |
bool | should_drop (ssize_t length) const |
bool | should_drop (const iovec iov[], int n, ssize_t &length) const |
![]() | |
virtual | ~RcObject () |
virtual void | _add_ref () |
virtual void | _remove_ref () |
long | ref_count () const |
WeakObject * | _get_weak_object () const |
Public Attributes | |
std::string | pub_address_str_ |
bool | enable_nagle_algorithm_ |
int | conn_retry_initial_delay_ |
double | conn_retry_backoff_multiplier_ |
int | conn_retry_attempts_ |
int | max_output_pause_period_ |
int | passive_reconnect_duration_ |
int | active_conn_timeout_period_ |
![]() | |
const OPENDDS_STRING | transport_type_ |
size_t | queue_messages_per_pool_ |
size_t | queue_initial_pools_ |
ACE_UINT32 | max_packet_size_ |
Max size (in bytes) of a packet (packet header + sample(s)) More... | |
size_t | max_samples_per_packet_ |
Max number of samples that should ever be in a single packet. More... | |
ACE_UINT32 | optimum_packet_size_ |
Optimum size (in bytes) of a packet (packet header + sample(s)). More... | |
bool | thread_per_connection_ |
long | datalink_release_delay_ |
size_t | datalink_control_chunks_ |
TimeDuration | fragment_reassembly_timeout_ |
size_t | receive_preallocated_message_blocks_ |
size_t | receive_preallocated_data_blocks_ |
Static Public Attributes | |
static const int | DEFAULT_PASSIVE_RECONNECT_DURATION = 2000 |
static const int | DEFAULT_ACTIVE_CONN_TIMEOUT_PERIOD = 5000 |
![]() | |
static const long | DEFAULT_DATALINK_RELEASE_DELAY = 10000 |
static const size_t | DEFAULT_DATALINK_CONTROL_CHUNKS = 32u |
Private Member Functions | |
TcpInst (const OPENDDS_STRING &name) | |
virtual | ~TcpInst () |
TransportImpl_rch | new_impl () |
Private Attributes | |
ACE_INET_Addr | local_address_ |
std::string | local_address_str_ |
Friends | |
class | TcpType |
class | TcpTransport |
class | ::DDS_TEST |
template<typename T , typename U > | |
RcHandle< T > | OpenDDS::DCPS::make_rch (U const &) |
Additional Inherited Members | |
![]() | |
static OPENDDS_STRING | formatNameForDump (const char *name) |
![]() | |
TransportInst (const char *type, const OPENDDS_STRING &name) | |
virtual | ~TransportInst () |
void | set_port_in_addr_string (OPENDDS_STRING &addr_str, u_short port_number) |
TransportImpl_rch | get_or_create_impl () |
TransportImpl_rch | get_impl () |
![]() | |
RcObject () | |
![]() | |
ACE_SYNCH_MUTEX | lock_ |
bool | shutting_down_ |
|
explicitprivate |
Definition at line 13 of file TcpInst.inl.
References DBG_ENTRY_LVL, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.
|
privatevirtual |
|
virtual |
Diagnostic aid.
Reimplemented from OpenDDS::DCPS::TransportInst.
Definition at line 74 of file TcpInst.cpp.
References active_conn_timeout_period_, conn_retry_attempts_, conn_retry_backoff_multiplier_, conn_retry_initial_delay_, OpenDDS::DCPS::TransportInst::dump_to_str(), enable_nagle_algorithm_, OpenDDS::DCPS::TransportInst::formatNameForDump(), local_address_string(), max_output_pause_period_, OPENDDS_STRING, passive_reconnect_duration_, and pub_address_str_.
|
inline |
The public address is our publicly advertised address. Usually this is the same as the local address, but if a public address is explicitly specified, use that.
Definition at line 100 of file TcpInst.h.
Referenced by populate_locator().
|
inlinevirtual |
Does the transport as configured support RELIABLE_RELIABILITY_QOS?
Implements OpenDDS::DCPS::TransportInst.
|
virtual |
Overwrite the default configurations with the configuration from the given section in the ACE_Configuration_Heap object.
Reimplemented from OpenDDS::DCPS::TransportInst.
Definition at line 35 of file TcpInst.cpp.
References ACE_TEXT(), active_conn_timeout_period_, conn_retry_attempts_, conn_retry_backoff_multiplier_, conn_retry_initial_delay_, enable_nagle_algorithm_, GET_CONFIG_DOUBLE_VALUE, GET_CONFIG_STRING_VALUE, GET_CONFIG_VALUE, OpenDDS::DCPS::TransportInst::load(), local_address(), max_output_pause_period_, OPENDDS_STRING, passive_reconnect_duration_, and pub_address_str_.
|
inline |
|
inline |
|
inline |
Definition at line 113 of file TcpInst.h.
References OpenDDS::DCPS::choose_single_coherent_address().
|
inline |
Definition at line 118 of file TcpInst.h.
References OpenDDS::DCPS::choose_single_coherent_address(), and OpenDDS::DCPS::to_dds_string().
|
inline |
Definition at line 124 of file TcpInst.h.
|
inline |
|
privatevirtual |
Implements OpenDDS::DCPS::TransportInst.
Definition at line 29 of file TcpInst.cpp.
References OpenDDS::DCPS::rchandle_from().
|
virtual |
Populate a transport locator sequence. Return the number of "locators.".
Implements OpenDDS::DCPS::TransportInst.
Definition at line 92 of file TcpInst.cpp.
References ACE_OutputCDR::buffer(), OpenDDS::DCPS::TransportLocator::data, get_public_address(), local_address(), OPENDDS_END_VERSIONED_NAMESPACE_DECL, pub_address_str_, ACE_OutputCDR::total_length(), and OpenDDS::DCPS::TransportLocator::transport_type.
|
friend |
|
friend |
int OpenDDS::DCPS::TcpInst::active_conn_timeout_period_ |
The time period in milliseconds for the acceptor side of a connection to wait for the connection to be established. If not connected within this period then this link is removed from pending and any other links are attempted. The default is 5 seconds (5000 millseconds).
Definition at line 93 of file TcpInst.h.
Referenced by dump_to_str(), and load().
int OpenDDS::DCPS::TcpInst::conn_retry_attempts_ |
Number of attempts to reconnect before giving up and calling on_publication_lost() and on_subscription_lost() callbacks. The default is 3.
Definition at line 71 of file TcpInst.h.
Referenced by dump_to_str(), and load().
double OpenDDS::DCPS::TcpInst::conn_retry_backoff_multiplier_ |
The backoff multiplier for reconnection strategy. The third and so on reconnect will be this value * the previous delay. Hence with conn_retry_initial_delay=500 and conn_retry_backoff_multiplier=1.5 the second reconnect attempt will be at 0.5 seconds after first retry connect fails; the third attempt will be 0.75 seconds after the second retry connect fails; the fourth attempt will be 1.125 seconds after the third retry connect fails. The default value is 2.0.
Definition at line 66 of file TcpInst.h.
Referenced by dump_to_str(), and load().
int OpenDDS::DCPS::TcpInst::conn_retry_initial_delay_ |
The initial retry delay in milliseconds. The first connection retry will be when the loss of connection is detected. The second try will be after this delay. The default is 500 miliseconds.
Definition at line 56 of file TcpInst.h.
Referenced by dump_to_str(), and load().
|
static |
|
static |
bool OpenDDS::DCPS::TcpInst::enable_nagle_algorithm_ |
Definition at line 50 of file TcpInst.h.
Referenced by dump_to_str(), and load().
|
private |
|
private |
int OpenDDS::DCPS::TcpInst::max_output_pause_period_ |
Maximum period (in milliseconds) of not being able to send queued messages. If there are samples queued and no output for longer than this period then the connection will be closed and on_*_lost() callbacks will be called. If the value is zero, the default, then this check will not be made.
Definition at line 78 of file TcpInst.h.
Referenced by dump_to_str(), and load().
int OpenDDS::DCPS::TcpInst::passive_reconnect_duration_ |
The time period in milliseconds for the acceptor side of a connection to wait for the connection to be reconnected. If not reconnected within this period then on_publication_lost() and on_subscription_lost() callbacks will be called. The default is 2 seconds (2000 millseconds).
Definition at line 86 of file TcpInst.h.
Referenced by dump_to_str(), and load().
std::string OpenDDS::DCPS::TcpInst::pub_address_str_ |
The address string provided to DCPSInfoRepo for connectors. This string is either from configuration file or defaults to the local address.
Definition at line 48 of file TcpInst.h.
Referenced by dump_to_str(), load(), and populate_locator().