harp.utils.network

Inheritance diagram of harp.utils.network

class Bind[source]

Bases: object

Bind(host: str, port: int)

__init__(host, port)
Parameters:
Return type:

None

host: str
port: int
get_available_network_port()[source]
wait_for_port(port, host='localhost', timeout=10.0)[source]

Wait until a port starts accepting TCP connections. Args:

port: Port number. host: Host address on which the port should exist. timeout: In seconds. How long to wait before raising errors.

Raises:

TimeoutError: The port isn’t accepting connection after time specified in timeout.

Parameters: