NetAddress
from panda3d.net import NetAddress
- class NetAddress
Bases:
DTOOL_SUPER_BASE
Represents a network address to which UDP packets may be sent or to which a TCP socket may be bound.
Inheritance diagram
- __init__(*args, **kwargs)
- clear()
C++ Interface: clear(const NetAddress self)
- /**
Resets the NetAddress to its initial state.
*/
- getAddr()
C++ Interface: get_addr(NetAddress self)
- /**
Returns the Socket_Address for this address.
*/
- getIp()
C++ Interface: get_ip(NetAddress self)
- /**
Returns the IP address to which this address refers, as a 32-bit integer,
in host byte order.
@deprecated Does not work with IPv6 addresses.
*/
- getIpComponent()
C++ Interface: get_ip_component(NetAddress self, 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.
*/
- getIpString()
C++ Interface: get_ip_string(NetAddress self)
- /**
Returns the IP address to which this address refers, formatted as a string.
*/
- getPort()
C++ Interface: get_port(NetAddress self)
- /**
Returns the port number to which this address refers.
*/
- get_addr()
C++ Interface: get_addr(NetAddress self)
- /**
Returns the Socket_Address for this address.
*/
- get_ip()
C++ Interface: get_ip(NetAddress self)
- /**
Returns the IP address to which this address refers, as a 32-bit integer,
in host byte order.
@deprecated Does not work with IPv6 addresses.
*/
- get_ip_component()
C++ Interface: get_ip_component(NetAddress self, 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.
*/
- get_ip_string()
C++ Interface: get_ip_string(NetAddress self)
- /**
Returns the IP address to which this address refers, formatted as a string.
*/
- get_port()
C++ Interface: get_port(NetAddress self)
- /**
Returns the port number to which this address refers.
*/
- isAny()
C++ Interface: is_any(NetAddress self)
- /**
Returns true if the IP address has only zeroes.
*/
- is_any()
C++ Interface: is_any(NetAddress self)
- /**
Returns true if the IP address has only zeroes.
*/
- setAny()
C++ Interface: set_any(const NetAddress self, 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).
*/
- setBroadcast()
C++ Interface: set_broadcast(const NetAddress self, int port)
- /**
Sets the address to the broadcast address.
*/
- setHost()
C++ Interface: set_host(const NetAddress self, 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.
*/
- setLocalhost()
C++ Interface: set_localhost(const NetAddress self, int port)
- /**
Sets the address up to refer to a particular port, on this host.
*/
- setPort()
C++ Interface: set_port(const NetAddress self, int port)
- /**
Resets the port number without otherwise changing the address.
*/
- set_any()
C++ Interface: set_any(const NetAddress self, 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).
*/
- set_broadcast()
C++ Interface: set_broadcast(const NetAddress self, int port)
- /**
Sets the address to the broadcast address.
*/
- set_host()
C++ Interface: set_host(const NetAddress self, 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.
*/