Represents a network address to which UDP packets may be sent or to which a TCP socket may be bound.
More...
Public Member Functions |
| | NetAddress () |
| | Constructs an unspecified address.
|
| | NetAddress (const Socket_Address &addr) |
| | Constructs an address from a given Socket_Address.
|
| void | clear () |
| | Resets the NetAddress to its initial state.
|
| const Socket_Address & | get_addr () const |
| | Returns the Socket_Address for this address.
|
| PN_uint32 | get_ip () const |
| | Returns the IP address to which this address refers, as a 32-bit integer, in host byte order.
|
| PN_uint8 | get_ip_component (int n) const |
| | Returns the nth 8-bit component of the IP address.
|
| string | get_ip_string () const |
| | Returns the IP address to which this address refers, formatted as a string.
|
| int | get_port () const |
| | Returns the port number to which this address refers.
|
|
void | output (ostream &out) const |
| bool | set_any (int port) |
| | Sets the address up to refer to a particular port, but not to any particular IP.
|
| bool | set_host (const string &hostname, int port) |
| | Sets the address up to refer to a particular port on a particular host.
|
| bool | set_localhost (int port) |
| | Sets the address up to refer to a particular port, on this host.
|
| void | set_port (int port) |
| | Resets the port number without otherwise changing the address.
|
Represents a network address to which UDP packets may be sent or to which a TCP socket may be bound.
Definition at line 27 of file netAddress.h.