Socket_Address
from panda3d.core import Socket_Address
- class Socket_Address
Bases:
A simple place to store and manipulate tcp and port address for communication layer
Inheritance diagram
- GetIPAddressRaw() int
Returns a raw 32-bit unsigned integer representing the IPv4 address.
Deprecated: Does not work with IPv6 addresses.
- __init__(inaddr: Socket_Address)
- __init__(port: int)
Constructor that lets us set a port value
- clear()
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_port() str
Return the ip address/port in dot notation string. If this is an IPv6 address, it will be enclosed in square brackets.
- 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.