networking#

Module for getting networking functionality.

Functions:

check_url_exists(url)

Check if a URL exists.

find_remoting_ip()

Find an IP address for establishing a gRPC connection by looping over getaddrinfo output.

get_free_port()

Identify a free port for establishing a new socket connection.

get_url_content(url)

Get the content of a URL.

ansys.cfx.core.utils.networking.check_url_exists(url: str) bool#

Check if a URL exists.

Parameters:
urlstr

URL to check.

Returns:
bool

True if the URL exists, False otherwise.

Raises:
ssl.SSLError

If there is an SSL error while checking the URL.

ansys.cfx.core.utils.networking.find_remoting_ip() str#

Find an IP address for establishing a gRPC connection by looping over getaddrinfo output.

Returns:
str

Remoting IP address.

ansys.cfx.core.utils.networking.get_free_port() int#

Identify a free port for establishing a new socket connection.

Returns:
int

Port number.

ansys.cfx.core.utils.networking.get_url_content(url: str) str#

Get the content of a URL.

Parameters:
urlstr

URL to get content from.

Returns:
str

Content of the URL.