pylabrobot.hamilton.transport.text_tcp.resolve_host#
- async pylabrobot.hamilton.transport.text_tcp.resolve_host(host: str, timeout: float = 0.5) str#
Turn what a user gave to connect to a machine into an IPv4 address.
An IPv4 address is returned as it is.
localhostand names ending in.localare resolved by the system.Anything else is taken to be the name of a machine, and is looked for among the machines that answer the discovery broadcast, by system identifier or module name, ignoring case.
- Parameters:
- Returns:
The IPv4 address to connect to.
- Raises:
ValueError – If the name does not resolve, matches no machine, or matches more than one.
- Return type: