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_T.h"
00018 #include "dds/DCPS/PoolAllocator.h"
00019 #include "TransportInst.h"
00020 #include "TransportInst_rch.h"
00021 
00022 #include <ace/Synch_Traits.h>
00023 
00024 namespace OpenDDS {
00025 namespace DCPS {
00026 
00027 class OpenDDS_Dcps_Export TransportConfig : public RcObject<ACE_SYNCH_MUTEX> {
00028 public:
00029 
00030   static const unsigned long DEFAULT_PASSIVE_CONNECT_DURATION = 60000;
00031 
00032   OPENDDS_STRING name() const { return name_; }
00033 
00034   typedef OPENDDS_VECTOR(TransportInst_rch) InstancesType;
00035   InstancesType instances_;
00036 
00037   bool swap_bytes_;
00038 
00039   /// The time period in milliseconds for the acceptor side
00040   /// of a connection to wait for the connection.
00041   /// The default is 60 seconds
00042   unsigned long passive_connect_duration_;
00043 
00044   /// Insert the TransportInst in sorted order (by name) in the instances_ list.
00045   /// Use when the names of the TransportInst objects are specifically assigned
00046   /// to have the sorted order make sense.
00047   void sorted_insert(const TransportInst_rch& inst);
00048 
00049   void populate_locators(OpenDDS::DCPS::TransportLocatorSeq& trans_info) const;
00050 
00051 private:
00052   friend class TransportRegistry;
00053   explicit TransportConfig(const OPENDDS_STRING& name);
00054   ~TransportConfig();
00055 
00056   const OPENDDS_STRING name_;
00057 };
00058 
00059 }
00060 }
00061 
00062 #if defined(__ACE_INLINE__)
00063 #include "TransportConfig.inl"
00064 #endif /* __ACE_INLINE__ */
00065 
00066 #endif /* OPENDDS_DCPS_TRANSPORTCONFIG_H */

Generated on Fri Feb 12 20:05:28 2016 for OpenDDS by  doxygen 1.4.7