TransportConfig.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_DCPS_TRANSPORTCONFIG_H
00009 #define OPENDDS_DCPS_TRANSPORTCONFIG_H
00010 
00011 #include <ace/config.h>
00012 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00013 #pragma once
00014 #endif
00015 
00016 #include "dds/DCPS/dcps_export.h"
00017 #include "dds/DCPS/RcObject.h"
00018 #include "dds/DCPS/PoolAllocator.h"
00019 #include "TransportInst.h"
00020 #include "TransportInst_rch.h"
00021 #include "ace/Synch_Traits.h"
00022 
00023 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00024 
00025 namespace OpenDDS {
00026 namespace DCPS {
00027 
00028 class OpenDDS_Dcps_Export TransportConfig : public RcObject {
00029 public:
00030 
00031   static const unsigned long DEFAULT_PASSIVE_CONNECT_DURATION = 60000;
00032 
00033   OPENDDS_STRING name() const { return name_; }
00034 
00035   typedef OPENDDS_VECTOR(TransportInst_rch) InstancesType;
00036   InstancesType instances_;
00037 
00038   bool swap_bytes_;
00039 
00040   /// The time period in milliseconds for the acceptor side
00041   /// of a connection to wait for the connection.
00042   /// The default is 60 seconds
00043   unsigned long passive_connect_duration_;
00044 
00045   /// Insert the TransportInst in sorted order (by name) in the instances_ list.
00046   /// Use when the names of the TransportInst objects are specifically assigned
00047   /// to have the sorted order make sense.
00048   void sorted_insert(const TransportInst_rch& inst);
00049 
00050   void populate_locators(OpenDDS::DCPS::TransportLocatorSeq& trans_info) const;
00051 
00052 private:
00053   friend class TransportRegistry;
00054   template <typename T, typename U>
00055   friend RcHandle<T> OpenDDS::DCPS::make_rch(U const&);
00056   explicit TransportConfig(const OPENDDS_STRING& name);
00057   ~TransportConfig();
00058 
00059   const OPENDDS_STRING name_;
00060 };
00061 
00062 }
00063 }
00064 
00065 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00066 
00067 #endif /* OPENDDS_DCPS_TRANSPORTCONFIG_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1