from panda3d.core import Socket_Address
class Socket_Address


A simple place to store and manipulate tcp and port address for communication layer

Inheritance diagram

Inheritance diagram of Socket_Address

GetIPAddressRaw() int

Returns a raw 32-bit unsigned integer representing the IPv4 address.

Deprecated: Does not work with IPv6 addresses.

__eq__(in: Socket_Address) bool
__init__(inaddr: Socket_Address)
__init__(port: int)

Constructor that lets us set a port value

__lt__(in: Socket_Address) bool
__ne__(in: Socket_Address) bool

Set the internal values to a suitable known value

get_family() int

Returns AF_INET if this is an IPv4 address, or AF_INET6 if this is an IPv6 address.

get_ip() str

Return the IP address portion in dot notation string.

get_ip_port() str

Return the ip address/port in dot notation string. If this is an IPv6 address, it will be enclosed in square brackets.

get_port() int

Get the port portion as an integer

is_any() bool

True if the address is zero.

is_mcast_range() bool

True if the address is in the multicast range.

set_any_IP(port: int) bool

Set to any address and a specified port

set_any_IPv6(port: int) bool

Set to any IPv6 address and a specified port.

set_broadcast(port: int) bool

Set to the broadcast address and a specified port

set_host(hostname: str) bool

Initializes the address from a string specifying both the address and port, separated by a colon. An IPv6 address must be enclosed in brackets.

set_host(hostname: str, port: int) bool

This function will take a port and string-based TCP address and initialize the address with this information. Returns true on success; on failure, it returns false and the address may be undefined.

set_host(ip4addr: int, port: int) bool
set_port(port: int) bool

Set to a specified port