Line data Source code
1 : /* 2 : * 3 : * 4 : * Distributed under the OpenDDS License. 5 : * See: http://www.opendds.org/license.html 6 : */ 7 : 8 : #ifndef OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTCONFIG_H 9 : #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTCONFIG_H 10 : 11 : #include <ace/config.h> 12 : #if !defined (ACE_LACKS_PRAGMA_ONCE) 13 : #pragma once 14 : #endif 15 : 16 : #include "dds/DCPS/dcps_export.h" 17 : #include "dds/DCPS/RcObject.h" 18 : #include "dds/DCPS/PoolAllocator.h" 19 : #include "TransportInst.h" 20 : #include "TransportInst_rch.h" 21 : #include "ace/Synch_Traits.h" 22 : 23 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 24 : 25 : namespace OpenDDS { 26 : namespace DCPS { 27 : 28 : class OpenDDS_Dcps_Export TransportConfig : public virtual RcObject { 29 : public: 30 : 31 : static const unsigned long DEFAULT_PASSIVE_CONNECT_DURATION = 60000; 32 : 33 0 : OPENDDS_STRING name() const { return name_; } 34 : 35 : typedef OPENDDS_VECTOR(TransportInst_rch) InstancesType; 36 : InstancesType instances_; 37 : 38 : bool swap_bytes_; 39 : 40 : /// The time period in milliseconds for the acceptor side 41 : /// of a connection to wait for the connection. 42 : /// The default is 60 seconds 43 : unsigned long passive_connect_duration_; 44 : 45 : /// Insert the TransportInst in sorted order (by name) in the instances_ list. 46 : /// Use when the names of the TransportInst objects are specifically assigned 47 : /// to have the sorted order make sense. 48 : void sorted_insert(const TransportInst_rch& inst); 49 : 50 : void populate_locators(OpenDDS::DCPS::TransportLocatorSeq& trans_info) const; 51 : 52 : private: 53 : friend class TransportRegistry; 54 : template <typename T, typename U> 55 : friend RcHandle<T> OpenDDS::DCPS::make_rch(U const&); 56 : explicit TransportConfig(const OPENDDS_STRING& name); 57 : ~TransportConfig(); 58 : 59 : const OPENDDS_STRING name_; 60 : }; 61 : 62 : } 63 : } 64 : 65 : OPENDDS_END_VERSIONED_NAMESPACE_DECL 66 : 67 : #endif /* OPENDDS_DCPS_TRANSPORTCONFIG_H */