qmi.core.util.format_address_and_port
- qmi.core.util.format_address_and_port(address: tuple[str, int]) str
Format a host address and port number as a string
"<host>:<port>".The host address may either be an IP address or a host name.
If an IPv6 address is used, the formatting will add square brackets around the host address to separate it from the port number (see also RFC 3986, section 3.2.2).
- Parameters:
address – Tuple (host, port).
- Returns:
String containing the formatted address and port.