nvflare.fuel.utils.network_utils module

get_local_addresses(number, host_name=None) list[source]

Return a list of local addresses

Parameters:
  • number – the number of addresses wanted

  • host_name – name of the local host

Returns:

get_open_ports(number) list[source]

Gets the number of open ports from the system. Note: the returned ports are only guaranteed to be accessible from the same host.

Parameters:

number – number of ports

Returns:

A list of open_ports