Panda3D
|
Public Member Functions | |
__init__ () | |
Constructs an unspecified address. More... | |
__init__ (const SocketAddress addr) | |
Constructs an address from a given Socket_Address. Normally, this constructor should not be used by user code; instead, create a default NetAddress and use one of the set_*() functions to set up an address. More... | |
clear () | |
Resets the NetAddress to its initial state. More... | |
const SocketAddress | getAddr () |
Returns the Socket_Address for this address. More... | |
size_t | getHash () |
PNUint32 | getIp () |
Returns the IP address to which this address refers, as a 32-bit integer, in host byte order. More... | |
PNUint8 | getIpComponent (int n) |
Returns the nth 8-bit component of the IP address. An IP address has four components; component 0 is the first (leftmost), and component 3 is the last (rightmost) in the dotted number convention. More... | |
str | getIpString () |
Returns the IP address to which this address refers, formatted as a string. More... | |
int | getPort () |
Returns the port number to which this address refers. More... | |
bool | operator!= (const NetAddress other) |
bool | operator== (const NetAddress other) |
output (Ostream out) | |
bool | setAny (int port) |
Sets the address up to refer to a particular port, but not to any particular IP. Returns true if successful, false otherwise (currently, this only returns true). More... | |
bool | setBroadcast (int port) |
Sets the address to the broadcast address. More... | |
bool | setHost (str hostname, int port) |
Sets the address up to refer to a particular port on a particular host. Returns true if the hostname is known, false otherwise. More... | |
bool | setLocalhost (int port) |
Sets the address up to refer to a particular port, on this host. More... | |
setPort (int port) | |
Resets the port number without otherwise changing the address. More... | |
__init__ | ( | ) |
Constructs an unspecified address.
__init__ | ( | const SocketAddress | addr | ) |
Constructs an address from a given Socket_Address. Normally, this constructor should not be used by user code; instead, create a default NetAddress and use one of the set_*() functions to set up an address.
clear | ( | ) |
Resets the NetAddress to its initial state.
const SocketAddress getAddr | ( | ) |
Returns the Socket_Address for this address.
size_t getHash | ( | ) |
PNUint32 getIp | ( | ) |
Returns the IP address to which this address refers, as a 32-bit integer, in host byte order.
PNUint8 getIpComponent | ( | int | n | ) |
Returns the nth 8-bit component of the IP address. An IP address has four components; component 0 is the first (leftmost), and component 3 is the last (rightmost) in the dotted number convention.
str getIpString | ( | ) |
Returns the IP address to which this address refers, formatted as a string.
int getPort | ( | ) |
Returns the port number to which this address refers.
bool operator!= | ( | const NetAddress | other | ) |
bool operator== | ( | const NetAddress | other | ) |
output | ( | Ostream | out | ) |
bool setAny | ( | int | port | ) |
Sets the address up to refer to a particular port, but not to any particular IP. Returns true if successful, false otherwise (currently, this only returns true).
bool setBroadcast | ( | int | port | ) |
Sets the address to the broadcast address.
bool setHost | ( | str | hostname, |
int | port | ||
) |
Sets the address up to refer to a particular port on a particular host. Returns true if the hostname is known, false otherwise.
bool setLocalhost | ( | int | port | ) |
Sets the address up to refer to a particular port, on this host.
setPort | ( | int | port | ) |
Resets the port number without otherwise changing the address.