#include <tnlUDP.h>
Public Types | |
enum | NamedAddress { None, Localhost, Broadcast, Any } |
Constants specify. More... | |
Public Member Functions | |
Address (TransportProtocol type=IPProtocol, NamedAddress name=Any, U16 port=0) | |
Constructs an address using a protocol, named address type and port. | |
Address (const char *string) | |
Constructs an address from a string, of the form "transport:address:port" where transport is one of ip, ipx, or (in the future) ipv6. | |
Address (const IPAddress &theAddress) | |
Constructs an address from an IP address. | |
bool | set (const char *string) |
Sets the address to the specified string, returning true if the string was a valid address. | |
void | set (const IPAddress &address) |
Sets the address to the specified IPAddress. | |
const char * | toString () const |
returns the formatted string corresponding to the address. | |
bool | operator== (const Address &theAddress) const |
returns true if theAddress is equal to this. | |
bool | operator!= (const Address &theAddress) const |
returns true if theAddress is not equal to this. | |
bool | isEqualAddress (const Address &theAddress) const |
returns true if the addresses are equal, not including the port. | |
U32 | hash () const |
Returns a 32-bit hash of this network address. | |
IPAddress | toIPAddress () const |
Returns a packed IPAddress of this address. | |
Data Fields | |
U16 | transport |
One of: IPXAddress, IPAddress. | |
U16 | port |
For IP: sin_port For IPX: sa_socket | |
U32 | netNum [4] |
Address data, sized for future IPv6 usage. |
|
Constants specify.
|
|
Constructs an address using a protocol, named address type and port.
|
|
Constructs an address from a string, of the form "transport:address:port" where transport is one of ip, ipx, or (in the future) ipv6.
|
|
Constructs an address from an IP address.
|
|
Sets the address to the specified string, returning true if the string was a valid address. Note that this call may block if the address portion of the string requires a DNS lookup. |
|
Sets the address to the specified IPAddress.
|
|
returns the formatted string corresponding to the address.
|
|
returns true if theAddress is equal to this.
|
|
returns true if theAddress is not equal to this.
|
|
returns true if the addresses are equal, not including the port.
|
|
Returns a 32-bit hash of this network address.
|
|
Returns a packed IPAddress of this address.
|
|
One of: IPXAddress, IPAddress.
|
|
For IP: sin_port For IPX: sa_socket
|
|
Address data, sized for future IPv6 usage.
|