Socket_Address

from acron.net import Socket_Address
class Socket_Address

Bases:

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

Inheritance diagram

digraph inheritance2a9ca6fe79 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Socket_Address" [URL="acron.net.Socket_Address.html#acron.net.Socket_Address",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Socket_Address" [arrowsize=0.75,style=""]; }
GetIPAddressRaw()

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

Deprecated: Does not work with IPv6 addresses.

__eq__()
__init__()

Constructor that lets us set a port value

__lt__()
__ne__()
clear()

Set the internal values to a suitable known value

get_family()

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

get_ip()

Return the IP address portion in dot notation string.

get_ip_port()

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

get_port()

Get the port portion as an integer

is_any()

True if the address is zero.

is_mcast_range()

True if the address is in the multicast range.

set_any_IP()

Set to any address and a specified port

set_any_IPv6()

Set to any IPv6 address and a specified port.

set_broadcast()

Set to the broadcast address and a specified port

set_host()

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()

Set to a specified port