xdas.io.get_free_port#
- xdas.io.get_free_port()[source]#
Find and return a free port on the host machine.
This function creates a temporary socket, binds it to an available port provided by the host, retrieves the port number, and then closes the socket. This is useful for finding an available port for network communication.
- Returns:
A free port number on the host machine.
- Return type: