NetAddress
from panda3d.core import NetAddress
- class NetAddress
Bases:
Represents a network address to which UDP packets may be sent or to which a TCP socket may be bound.
Inheritance diagram
- __eq__(other: NetAddress) bool
- __init__()
Constructs an unspecified address.
- __init__(param0: NetAddress)
- __init__(addr: Socket_Address)
Constructs an address from a given
Socket_Address
. Normally, this constructor should not be used by user code; instead, create a defaultNetAddress
and use one of the set_*() functions to set up an address.
- __ne__(other: NetAddress) bool
- clear()
Resets the
NetAddress
to its initial state.
- getAddr() Socket_Address
Returns the
Socket_Address
for this address.
- getIp() int
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(n: int) uint8_t
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.
- setAny(port: int) bool
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).