#include <EHnet++/InetAddress.h>
Inheritance diagram for strmod::ehnet::InetAddress:

Public Methods | |
| InetAddress (const::std::string &h_name, U2Byte prt) | |
| Create an InetAddress from a hostname/dotted-quad and port #. | |
| InetAddress (U2Byte port) | |
| Create an InetAddress pointing an INADDR_ANY and a port #. | |
| InetAddress (const InetAddress &b) | |
| Create a copy of another InetAddress. | |
| InetAddress (const::sockaddr_in &iadr) | |
| Create an InetAddress from the associated sockaddr_in structure. | |
| virtual | ~InetAddress () |
| No pointers or anything, so not much to destroy. | |
| virtual int | AreYouA (const ClassIdent &cid) const |
| virtual::sockaddr * | SockAddr () |
| Get the sockaddr struct this object is wrapping. | |
| InetAddress * | Copy () const |
| Clone this address, no matter it's actual type. | |
| virtual int | AddressSize () const |
| How long is this address in memory? | |
| virtual::std::string | AsString () |
| Fetch a string representation of the SocketAddress. | |
| ::std::string | GetHostname () const |
| Get the host name associated with this address, possibly the result of a reverse DNS lookup. | |
| ::std::string | GetHostname (bool forcelookup) |
| Get the host name associated with this address, possibly the result of a reverse DNS lookup. | |
| U2Byte | GetPort () const |
| Get the port number. | |
| const InetAddress & | operator= (const InetAddress &b) |
| Only necessary because of the DNS lookups. | |
| const InetAddress & | operator= (const::sockaddr_in &iadr) |
| Copy an InetAddress from a sockaddr_in structure. | |
Static Public Attributes | |
| const NET_ClassIdent | identifier |
| Globally unique identifier for this class. | |
Protected Methods | |
| virtual const lcore::ClassIdent * | i_GetIdent () const |
| Returns the class identifier for the class the object actually is. | |
| virtual SocketAddress * | MakeCopy () const |
| Clone this address, no matter it's actual type. | |
| void | InvalidateAddress () |
| Mark this address as invalid. | |
Static Protected Methods | |
| bool | ParseNumeric (const char *numeric_addr, U4Byte &num) |
| Parse out a dotted-quad. | |
| bool | NameToIaddr (const char *name_addr, U4Byte &num) |
| Lookup an IPV4 address from a hostname - returns false on failure. | |
| ::std::string | IaddrToName (const::sockaddr_in &inaddr) |
| Lookup a hostname from an IPV4 address. | |
This class represents an IPV4 TCP or UDP address. It doesn't represent a straight IPV4 address because it has a port number.
This class has the nasty habit of doing blocking DNS lookups at random times. This may cause a several second pause while they're going on.
Definition at line 88 of file InetAddress.h.
|
||||||||||||
|
Create an InetAddress from a hostname/dotted-quad and port #.
Definition at line 132 of file InetAddress.cxx. |
|
|
Create an InetAddress pointing an INADDR_ANY and a port #.
Definition at line 166 of file InetAddress.cxx. |
|
|
Create an InetAddress from the associated sockaddr_in structure. Useful for addresses you get back from accept(2) or getpeername(2) |
|
|
Clone this address, no matter it's actual type. This is a non-virtual for compilers that don't support contravariance in the return types of virtual functions. Reimplemented from strmod::ehnet::SocketAddress. Definition at line 120 of file InetAddress.h. |
|
|
Returns the class identifier for the class the object actually is. Should always be overridden in any class that has a static identifier member. Reimplemented from strmod::ehnet::SocketAddress. Definition at line 140 of file InetAddress.h. |
|
|
Copy an InetAddress from a sockaddr_in structure. Useful for addresses you get back from accept(2) or getpeername(2). |
|
|
Globally unique identifier for this class. Every class that might need to be identified should have a public static const identifier object in it. Reimplemented from strmod::ehnet::SocketAddress. |
1.3-rc1