1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
<HTML><HEAD><TITLE>InetHostAddress Class</TITLE></HEAD>
<BODY bgcolor="#ffffff">
<H1>InetHostAddress Class Reference</H1>
<p>
[<A HREF="index.html">APE Index</A>] [<A HREF="hier.html">APE Hierarchy</A>]
[<A HREF="header-list.html">Headers</A>]
</p>
<HR>
<P>Address of a specific Internet host machine. <a href="#short">More...</a></P>
<P>
<code>
#include <<a href="socket-h.html">socket.h</a>>
</code>
</P>
<P>
Inherits: <a href="InetAddress.html">InetAddress</a>
<P>
<H2>Public Members</H2>
<UL>
<LI> <b><a href="#ref0">InetHostAddress</a></b> (const char *host = NULL)
</LI>
<LI> <b><a href="#ref1">InetHostAddress</a></b> (struct in_addr addr)
</LI>
<LI>InetHostAddress& <b><a href="#ref2">operator=</a></b> (struct in_addr addr)
</LI>
<LI>bool <b><a href="#ref3">operator==</a></b> (InetHostAddress &a)
</LI>
<LI>bool <b><a href="#ref4">operator!=</a></b> (InetHostAddress &a)
</LI>
<LI>InetHostAddress& <b><a href="#ref5">operator&=</a></b> (InetMaskAddress &mask)
</LI>
<LI> friend class <b><a name="ref6">InetMaskAddress</a></b>
</LI>
<LI>friend InetHostAddress <b><a name="ref7">operator&</a></b> (InetHostAddress &addr, InetMaskAddress &mask)
</LI>
</UL>
<HR>
<H2><a name="short">Detailed Description</a></H2>
<P>
This object is used to hold the actual and valid internet address of a
specific host machine that will be accessed through a socket.
</P><HR>
<H3><b> <a name="ref0"></a><a name="InetHostAddress">InetHostAddress</a>(const char *host = NULL) </b><code>[public]</code></H3>
<p>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.
</p><p>
</p>
<dl><dt><b>Parameters</b>:<dd>
<table width="100%" border="0">
<tr><td align="left" valign="top">
host</td><td align="left" valign="top">
dns or physical address of an Internet host.</td></tr>
</table>
</dl>
<H3><b> <a name="ref1"></a><a name="InetHostAddress">InetHostAddress</a>(struct in_addr addr) </b><code>[public]</code></H3>
<p>Convert a system socket binary address such as may be
returned through the accept() call or getsockpeer() into
an internet host address object.
</p><p>
</p>
<dl><dt><b>Parameters</b>:<dd>
<table width="100%" border="0">
<tr><td align="left" valign="top">
addr</td><td align="left" valign="top">
binary address of internet host.</td></tr>
</table>
</dl>
<H3><b><a href="InetHostAddress.html">InetHostAddress</a>& <a name="ref2"></a><a name="operator=">operator=</a>(struct in_addr addr) </b><code>[public]</code></H3>
<p>Convert a system socket binary address into an existing
internet host address object through assignment by overloading
the = operator.
</p><p>
</p>
<dl><dt><b>Parameters</b>:<dd>
<table width="100%" border="0">
<tr><td align="left" valign="top">
addr</td><td align="left" valign="top">
binary address of internet host.</td></tr>
</table>
</dl>
<H3><b>bool <a name="ref3"></a><a name="operator==">operator==</a>(<a href="InetHostAddress.html">InetHostAddress</a> &a) </b><code>[public]</code></H3>
<p>Compare two internet host addresses to see if they are equal
(if they specify the physical address of the same internet host).
</p>
<H3><b>bool <a name="ref4"></a><a name="operator!=">operator!=</a>(<a href="InetHostAddress.html">InetHostAddress</a> &a) </b><code>[public]</code></H3>
<p>Compare two internet host addresses to see if they are not
equal (if they each refer to unique and different physical
ip addresses).
</p>
<H3><b><a href="InetHostAddress.html">InetHostAddress</a>& <a name="ref5"></a><a name="operator&=">operator&=</a>(<a href="InetMaskAddress.html">InetMaskAddress</a> &mask) </b><code>[public]</code></H3>
<p>Mask the internet host address object with a network mask address.
This is commonly used to coerce an address by subnet.
</p>
<HR>
<TABLE WIDTH="100%"><TR><TD ALIGN="left" VALIGN="top">
<UL><LI><I>Author</I>: David Sugar <dyfet@ostel.com>. </LI>
<LI>Documentation generated by dyfet@home.sys on Thu Dec 16 09:54:26 EST 1999
</LI>
</UL></TD><TD ALIGN="RIGHT" VALIGN="TOP">
<b>K</b><i>doc</i>
</TD>
</TR></TABLE></BODY></HTML>
|