InetHostAddress Class Reference

[APE Index] [APE Hierarchy] [Headers]


Address of a specific Internet host machine. More...

#include <socket.h>

Inherits: InetAddress

Public Members


Detailed Description

This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket.


InetHostAddress(const char *host = NULL) [public]

Create a new host address for a specific internet host. The internet host can be specified in a null terminated ASCII string and include either the physical host address or the DNS name of a host machine. Hence, an InetHostAddress ("www.voxilla.org") can be directly declaired in this manner. If no host address is specified, the local host (127.0.0.1) is assumed.

Parameters:
host dns or physical address of an Internet host.

InetHostAddress(struct in_addr addr) [public]

Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object.

Parameters:
addr binary address of internet host.

InetHostAddress& operator=(struct in_addr addr) [public]

Convert a system socket binary address into an existing internet host address object through assignment by overloading the = operator.

Parameters:
addr binary address of internet host.

bool operator==(InetHostAddress &a) [public]

Compare two internet host addresses to see if they are equal (if they specify the physical address of the same internet host).

bool operator!=(InetHostAddress &a) [public]

Compare two internet host addresses to see if they are not equal (if they each refer to unique and different physical ip addresses).

InetHostAddress& operator&=(InetMaskAddress &mask) [public]

Mask the internet host address object with a network mask address. This is commonly used to coerce an address by subnet.


  • Author: David Sugar <dyfet@ostel.com>.
  • Documentation generated by dyfet@home.sys on Thu Dec 16 09:54:26 EST 1999
Kdoc