from panda3d.core import NetAddress
- class NetAddress
Represents a network address to which UDP packets may be sent or to which a TCP socket may be bound.
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 default
NetAddressand use one of the set_*() functions to set up an 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).
- setHost(hostname: str, port: int) bool
Sets the address up to refer to a particular port on a particular host. Returns true if the hostname is known, false otherwise.