peng3dnet.util - Utility functions¶
Normalizes the given address to a string like
This method is currently not implemented.
Normalizes the given address to a 2-tuple as accepted by the
Currently accepts a 2-tuple and IPv4 addresses in string format.
If the address does not contain a port, the
default_portwill be used.
Note that this function will pass through any exceptions raised by parsing functions it calls.
Parses an IP Address into a tuple of
If the address does not contain an explicitly specified port, the value given with
Note that currently only IPv4 addresses are supported, but IPv6 support may be added in the future. If an IPv6 Address is detected, a
UnsupportedAddressErrorwill be raised.
Additionally, the port returned is checked for plausibility, e.g. an integer in range 0-65535. If the port is invalid in any way, a
InvalidPortErrorwill be raised.