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 41 of file NetworkAddress.h.


Constructor & Destructor Documentation

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

Definition at line 16 of file NetworkAddress.inl.

References DBG_ENTRY_LVL.

00017   : reserved_(0)
00018 {
00019   DBG_ENTRY_LVL("NetworkAddress","NetworkAddress",6);
00020 }

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

Definition at line 23 of file NetworkAddress.inl.

References ACE_TEXT_ALWAYS_CHAR, addr_, ACE_INET_Addr::addr_to_string(), and DBG_ENTRY_LVL.

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

Here is the call graph for this function:

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

Definition at line 36 of file NetworkAddress.inl.

References addr_, and DBG_ENTRY_LVL.

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

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

Definition at line 45 of file NetworkAddress.inl.

00046 {
00047 }


Member Function Documentation

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

Definition at line 57 of file NetworkAddress.inl.

References addr_, LM_DEBUG, and reserved_.

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

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 50 of file NetworkAddress.inl.

References addr_, DBG_ENTRY_LVL, and ACE_INET_Addr::set().

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

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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

Definition at line 59 of file NetworkAddress.h.

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

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

Definition at line 56 of file NetworkAddress.h.

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


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1