EnetAddress¶
-
class EnetAddress¶
A lightweight value class describing an IPv4 endpoint (host and port), as used by the ENet reliable-UDP library. The host is stored in network byte order, matching ENetAddress.
Inheritance diagram
digraph inheritance84fbbf7d21 { 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=""]; "EnetAddress" [URL="acron.enet.EnetAddress.html#acron.enet.EnetAddress",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" -> "EnetAddress" [arrowsize=0.75,style=""]; }- EnetAddress.__eq__()¶
- EnetAddress.__init__()¶
Creates an address from a host name (which may be a dotted-quad IP string or a DNS name) and a port. If the name cannot be resolved, the host part is left as 0 (ENET_HOST_ANY).
- EnetAddress.__ne__()¶
- EnetAddress.get_host()¶
- EnetAddress.get_host_name()¶
Performs a reverse DNS lookup on the address. Falls back to the dotted IP string if the lookup fails. Note that this may block on network traffic.
- EnetAddress.get_ip_string()¶
Returns the address as a dotted-quad IP string, e.g. “127.0.0.1”.
- EnetAddress.get_port()¶
- EnetAddress.output()¶
- EnetAddress.set_host()¶
- EnetAddress.set_host_name()¶
Resolves the given host name (dotted-quad IP string or DNS name) and stores the result. Returns true on success, false if resolution failed.
- EnetAddress.set_port()¶