networking#
Provides a module to get networking functionality.
Functions:
|
Check if a URL exists. |
Find an ip address at which a gRPC connection can be established by looping over getaddrinfo output. |
|
Identifies a free port to which a new socket connection can be established. |
|
|
Get the UDS path from a UDS address. |
|
Get the content of a URL. |
|
Check if the given ip address corresponds to localhost. |
- ansys.fluent.core.utils.networking.check_url_exists(url)#
Check if a URL exists.
- Parameters:
- url
str URL to check
- url
- Returns:
- bool
True if the URL exists, False otherwise
- Raises:
ssl.SSLErrorIf there is an SSL error while checking the URL
ValueErrorIf the URL scheme is not http or https
- ansys.fluent.core.utils.networking.find_remoting_ip()#
Find an ip address at which a gRPC connection can be established by looping over getaddrinfo output.
- Returns:
strremoting ip address
- ansys.fluent.core.utils.networking.get_free_port()#
Identifies a free port to which a new socket connection can be established.
- Returns:
intport number
- ansys.fluent.core.utils.networking.get_uds_path(address)#
Get the UDS path from a UDS address.
- ansys.fluent.core.utils.networking.get_url_content(url)#
Get the content of a URL.
- Parameters:
- url
str URL to get content from
- url
- Returns:
strcontent of the URL
- Raises:
ValueErrorIf the URL scheme is not http or https