#include <tnlUDP.h>
Public Types | |
| enum | NamedAddress |
| Constants specify. | |
Public Methods | |
| 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. | |
Public Attributes | |
| 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. | |
Definition at line 62 of file tnlUDP.h.
|
|
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. Definition at line 648 of file udp.cpp. References TNL::IPXProtocol, netNum, port, TNL::TCPProtocol, transport, and TNL::U32. Referenced by Address(). |
1.2.18