Socket_Address

from panda3d.net import Socket_Address
class Socket_Address

Bases: DTOOL_SUPER_BASE

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

Inheritance diagram

Inheritance diagram of Socket_Address

GetIPAddressRaw()

C++ Interface: GetIPAddressRaw(Socket_Address self)

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

  • @deprecated Does not work with IPv6 addresses.

*/

__init__(*args, **kwargs)
clear()

C++ Interface: clear(const Socket_Address self)

/**
  • Set the internal values to a suitable known value

*/

getFamily()

C++ Interface: get_family(Socket_Address self)

/**
  • Returns AF_INET if this is an IPv4 address, or AF_INET6 if this is an IPv6

  • address.

*/

getIp()

C++ Interface: get_ip(Socket_Address self)

/**
  • Return the IP address portion in dot notation string.

*/

getIpPort()

C++ Interface: get_ip_port(Socket_Address self)

/**
  • Return the ip address/port in dot notation string. If this is an IPv6

  • address, it will be enclosed in square brackets.

*/

getPort()

C++ Interface: get_port(Socket_Address self)

/**
  • Get the port portion as an integer

*/

get_family()

C++ Interface: get_family(Socket_Address self)

/**
  • Returns AF_INET if this is an IPv4 address, or AF_INET6 if this is an IPv6

  • address.

*/

get_ip()

C++ Interface: get_ip(Socket_Address self)

/**
  • Return the IP address portion in dot notation string.

*/

get_ip_port()

C++ Interface: get_ip_port(Socket_Address self)

/**
  • Return the ip address/port in dot notation string. If this is an IPv6

  • address, it will be enclosed in square brackets.

*/

get_port()

C++ Interface: get_port(Socket_Address self)

/**
  • Get the port portion as an integer

*/

isAny()

C++ Interface: is_any(Socket_Address self)

/**
  • True if the address is zero.

*/

isMcastRange()

C++ Interface: is_mcast_range(Socket_Address self)

/**
  • True if the address is in the multicast range.

*/

is_any()

C++ Interface: is_any(Socket_Address self)

/**
  • True if the address is zero.

*/

is_mcast_range()

C++ Interface: is_mcast_range(Socket_Address self)

/**
  • True if the address is in the multicast range.

*/

setAnyIP()

C++ Interface: set_any_IP(const Socket_Address self, int port)

/**
  • Set to any address and a specified port

*/

setAnyIPv6()

C++ Interface: set_any_IPv6(const Socket_Address self, int port)

/**
  • Set to any IPv6 address and a specified port.

*/

setBroadcast()

C++ Interface: set_broadcast(const Socket_Address self, int port)

/**
  • Set to the broadcast address and a specified port

*/

setHost()

C++ Interface: set_host(const Socket_Address self, str hostname) set_host(const Socket_Address self, str hostname, int port) set_host(const Socket_Address self, int ip4addr, int port)

/**

*/

/**
  • 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.

*/

/**
  • Initializes the address from a string specifying both the address and port,

  • separated by a colon. An IPv6 address must be enclosed in brackets.

*/

setPort()

C++ Interface: set_port(const Socket_Address self, int port)

/**
  • Set to a specified port

*/

set_any_IP()

C++ Interface: set_any_IP(const Socket_Address self, int port)

/**
  • Set to any address and a specified port

*/

set_any_IPv6()

C++ Interface: set_any_IPv6(const Socket_Address self, int port)

/**
  • Set to any IPv6 address and a specified port.

*/

set_broadcast()

C++ Interface: set_broadcast(const Socket_Address self, int port)

/**
  • Set to the broadcast address and a specified port

*/

set_host()

C++ Interface: set_host(const Socket_Address self, str hostname) set_host(const Socket_Address self, str hostname, int port) set_host(const Socket_Address self, int ip4addr, int port)

/**

*/

/**
  • 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.

*/

/**
  • 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_port()

C++ Interface: set_port(const Socket_Address self, int port)

/**
  • Set to a specified port

*/