rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWInet6Host Class Reference
[Essential Networking Module]

Encapsulates an Internet host IPv6 address and its names. More...

#include <rw/network/RWInet6Host.h>

List of all members.

Public Types

enum  NameLookup { numeric }

Public Member Functions

 RWInet6Host (void)
 RWInet6Host (struct in6_addr IPAddress)
 RWInet6Host (const RWCString &hostname)
 RWInet6Host (const char *)
void prepare () const
void prepare (NameLookup lookup) const
RWCString getName () const
struct in6_addr getAddress () const
RWTValVector< RWCStringgetAliases () const
RWTValVector< struct in6_addr > getAddresses () const
RWCString id (unsigned level=0) const
bool operator== (const RWInet6Host &rhs) const
bool operator!= (const RWInet6Host &rhs) const

Static Public Member Functions

static RWInet6Host me ()
static RWCString addressAsString (struct in6_addr IPAddress)

Related Functions

(Note that these are not member functions.)



std::ostream & operator<< (std::ostream &strm, const RWInet6Host &host)

Detailed Description

Encapsulates an Internet host IPv6 address and its names. You can construct an RWInet6Host from either an IPv6 address or a symbolic name.


Member Enumeration Documentation

Attributes to change name lookup behavior.

Enumerator:
numeric 

If the host address is already known, a lookup will not be used to discover the host name. The colon-hexadecimal form of the host address will be used as the host name.


Constructor & Destructor Documentation

RWInet6Host::RWInet6Host ( void   ) 

An Internet host can be specified as an actual address or through a string. The string can be either the symbolic name of the host or an IPv6 hex address. The default constructor creates a special host that represents an unspecified IPv6 address on the current machine. This is useful when constructing servers.

RWInet6Host::RWInet6Host ( struct in6_addr  IPAddress  ) 

An Internet host can be specified as an actual address or through a string. The string can be either the symbolic name of the host or an IPv6 hex address. The default constructor creates a special host that represents an unspecified IPv6 address on the current machine. This is useful when constructing servers.

RWInet6Host::RWInet6Host ( const RWCString hostname  ) 

An Internet host can be specified as an actual address or through a string. The string can be either the symbolic name of the host or an IPv6 hex address. The default constructor creates a special host that represents an unspecified IPv6 address on the current machine. This is useful when constructing servers.

RWInet6Host::RWInet6Host ( const char *   ) 

An Internet host can be specified as an actual address or through a string. The string can be either the symbolic name of the host or an IPv6 hex address. The default constructor creates a special host that represents an unspecified IPv6 address on the current machine. This is useful when constructing servers.


Member Function Documentation

static RWCString RWInet6Host::addressAsString ( struct in6_addr  IPAddress  )  [static]

Takes an address as an in6_addr and returns the IPv6 hex address string representation of the address. To go from an IPv6 hex address string to an address, build an RWInet6Host object from the IPv6 hex address string.

struct in6_addr RWInet6Host::getAddress (  )  const [read]

Returns the primary IPv6 address for this host entry as an in6_addr. If you want to print out an IPv6 address, use the addressAsString() static member function.

RWTValVector<struct in6_addr> RWInet6Host::getAddresses (  )  const

Returns a list of addresses for this host entry as in6_addr structs. If you want to print out an IPv6 address, use the addressAsString() static member function. The primary address is the first entry in the getAddresses() array. This call may block if prepare() has not been called.

RWTValVector<RWCString> RWInet6Host::getAliases (  )  const

Returns the list of aliases for this host entry. The official name is not included in the list of aliases. This call may block if prepare() has not been called.

Note:
This method is provided only for compatibility with RWInetHost, and will return an empty collection.
RWCString RWInet6Host::getName (  )  const

Returns the official name for this host entry. This call may block if prepare() has not been called.

RWCString RWInet6Host::id ( unsigned  level = 0  )  const

Returns a string describing self. The verbosity of the output is controlled by level, where level=0 is the most basic output, and level=9 is the most verbose.

static RWInet6Host RWInet6Host::me (  )  [static]

Returns the host object for the host on which this program is currently running.

bool RWInet6Host::operator!= ( const RWInet6Host rhs  )  const

Return true or false to indicate whether two hosts objects are equal or not.

bool RWInet6Host::operator== ( const RWInet6Host rhs  )  const

Return true or false to indicate whether two hosts objects are equal or not.

void RWInet6Host::prepare ( NameLookup  lookup  )  const

Ensures that no future operations block. The prepare() function calls the host database routines to gather information about this host. It is not necessary to explicitly call prepare() because it is called by other member functions if needed. No exceptions are thrown by prepare().

void RWInet6Host::prepare (  )  const

Ensures that no future operations block. The prepare() function calls the host database routines to gather information about this host. It is not necessary to explicitly call prepare() because it is called by other member functions if needed. No exceptions are thrown by prepare().


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  strm,
const RWInet6Host host 
) [related]

Outputs a representation of host on strm. The representation is generated using the member function host.id() with level=0.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.