OpenDDS::DCPS::NetworkAddress Struct Reference

Defines a wrapper around address info which is used for advertise. More...

#include <NetworkAddress.h>

List of all members.

Public Member Functions

 NetworkAddress ()
 NetworkAddress (const ACE_INET_Addr &addr, bool use_hostname=false)
 NetworkAddress (const OPENDDS_STRING &addr)
 ~NetworkAddress ()
void dump ()
void to_addr (ACE_INET_Addr &addr) const

Public Attributes

CORBA::Octet reserved_
OPENDDS_STRING addr_
 The address in string format. e.g. ip:port, hostname:port.


Detailed Description

Defines a wrapper around address info which is used for advertise.

This is used to send/receive an address information through transport.

Definition at line 39 of file NetworkAddress.h.


Constructor & Destructor Documentation

ACE_INLINE OpenDDS::DCPS::NetworkAddress::NetworkAddress (  ) 

Definition at line 14 of file NetworkAddress.inl.

References DBG_ENTRY_LVL.

00015   : reserved_(0)
00016 {
00017   DBG_ENTRY_LVL("NetworkAddress","NetworkAddress",6);
00018 }

ACE_INLINE OpenDDS::DCPS::NetworkAddress::NetworkAddress ( const ACE_INET_Addr &  addr,
bool  use_hostname = false 
) [explicit]

Definition at line 21 of file NetworkAddress.inl.

References addr_, and DBG_ENTRY_LVL.

00023   : reserved_(0)
00024 {
00025   DBG_ENTRY_LVL("NetworkAddress","NetworkAddress",6);
00026 
00027   ACE_TCHAR addr_s[MAXHOSTNAMELEN + 1];
00028   addr.addr_to_string(addr_s, sizeof (addr_s), !use_hostname);
00029 
00030   this->addr_ = ACE_TEXT_ALWAYS_CHAR(addr_s);
00031 }

ACE_INLINE OpenDDS::DCPS::NetworkAddress::NetworkAddress ( const OPENDDS_STRING &  addr  )  [explicit]

Definition at line 34 of file NetworkAddress.inl.

References addr_, and DBG_ENTRY_LVL.

00035   : reserved_(0)
00036 {
00037   DBG_ENTRY_LVL("NetworkAddress","NetworkAddress",6);
00038 
00039   addr_ = addr;
00040 }

ACE_INLINE OpenDDS::DCPS::NetworkAddress::~NetworkAddress (  ) 

Definition at line 43 of file NetworkAddress.inl.

00044 {
00045 }


Member Function Documentation

ACE_INLINE void OpenDDS::DCPS::NetworkAddress::dump (  ) 

Definition at line 55 of file NetworkAddress.inl.

References addr_, and reserved_.

00056 {
00057   ACE_DEBUG((LM_DEBUG, "(%P|%t) NetworkAddress addr: %s reserved: %d\n", addr_.c_str(), reserved_));
00058 }

ACE_INLINE void OpenDDS::DCPS::NetworkAddress::to_addr ( ACE_INET_Addr &  addr  )  const

Accessor to populate the provided ACE_INET_Addr object from the address string received through transport.

Definition at line 48 of file NetworkAddress.inl.

References addr_, and DBG_ENTRY_LVL.

Referenced by OpenDDS::DCPS::UdpTransport::blob_to_key(), OpenDDS::DCPS::UdpTransport::get_connection_addr(), and OpenDDS::DCPS::AssociationData::get_remote_address().

00049 {
00050   DBG_ENTRY_LVL("NetworkAddress","to_addr",6);
00051   addr.set(addr_.c_str());
00052 }


Member Data Documentation

OPENDDS_STRING OpenDDS::DCPS::NetworkAddress::addr_

The address in string format. e.g. ip:port, hostname:port.

Definition at line 57 of file NetworkAddress.h.

Referenced by dump(), NetworkAddress(), operator<<(), operator>>(), and to_addr().

CORBA::Octet OpenDDS::DCPS::NetworkAddress::reserved_

Reserve byte for some feature supports in the future. e.g. version support.

Definition at line 54 of file NetworkAddress.h.

Referenced by dump(), operator<<(), and operator>>().


The documentation for this struct was generated from the following files:
Generated on Fri Feb 12 20:06:27 2016 for OpenDDS by  doxygen 1.4.7