SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Encapsulates an Internet host IPv6 address and its names. More...
#include <rw/network/RWInet6Host.h>
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< RWCString > | getAliases () 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) |
Encapsulates an Internet host IPv6 address and its names. You can construct an RWInet6Host from either an IPv6 address or a symbolic name.
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.
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.
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 |
void RWInet6Host::prepare | ( | ) | const |
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
.
© 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.