Expand description
The net_utils
module assists with networking
Structs§
- Socket
Config - UdpSocket
Pair - A data type representing a public Udp socket
Constants§
- DEFAULT_
IP_ ECHO_ SERVER_ THREADS - MAX_
PORT_ COUNT_ PER_ MESSAGE - MINIMUM_
IP_ ECHO_ SERVER_ THREADS - MINIMUM_
VALIDATOR_ PORT_ RANGE_ WIDTH - VALIDATOR_
PORT_ RANGE
Functions§
- bind_
common - binds both a UdpSocket and a TcpListener
- bind_
common_ in_ range Deprecated - bind_
common_ in_ range_ with_ config - bind_
common_ with_ config - binds both a UdpSocket and a TcpListener on the same port
- bind_
in_ range - bind_
in_ range_ with_ config - bind_
more_ with_ config - bind_to
- bind_
to_ localhost - bind_
to_ unspecified - bind_
to_ with_ config - bind_
to_ with_ config_ non_ blocking - bind_
two_ in_ range_ with_ offset - bind_
two_ in_ range_ with_ offset_ and_ config - bind_
with_ any_ port Deprecated - bind_
with_ any_ port_ with_ config - find_
available_ port_ in_ range - Searches for an open port on a given binding ip_addr in the provided range.
- get_
cluster_ shred_ version - Retrieves cluster shred version from Entrypoint address provided.
- get_
cluster_ shred_ version_ with_ binding - Retrieves cluster shred version from Entrypoint address provided, binds client-side socket to the IP provided.
- get_
public_ ip_ addr - Determine the public IP address of this machine by asking an ip_echo_server at the given address.
- get_
public_ ip_ addr_ with_ binding - Determine the public IP address of this machine by asking an ip_echo_server at the given address. This function will bind to the provided bind_addreess.
- ip_
echo_ server - Starts a simple TCP server that echos the IP address of any peer that connects Used by functions like |get_public_ip_addr| and |get_cluster_shred_version|
- is_host
- is_
host_ port - multi_
bind_ in_ range Deprecated - multi_
bind_ in_ range_ with_ config - binds num sockets to the same port in a range with config
- parse_
host - parse_
host_ port - parse_
port_ or_ addr - parse_
port_ range - verify_
all_ reachable_ tcp - Checks if all of the provided TCP ports are reachable by the machine at
ip_echo_server_addr
. Tests must complete within timeout provided. Tests will run concurrently when possible, using up to 64 threads for IO. This function assumes that all sockets are bound to the same IP, and will panic otherwise. - verify_
all_ reachable_ udp - Checks if all of the provided UDP ports are reachable by the machine at
ip_echo_server_addr
. Tests must complete within timeout provided. Tests will run concurrently when possible, using up to 64 threads for IO. This function assumes that all sockets are bound to the same IP, and will panic otherwise - verify_
reachable_ ports Deprecated - Checks if all of the provided TCP/UDP ports are reachable by the machine at
ip_echo_server_addr
. Tests must complete within timeout provided. Tests will run concurrently when possible, using up to 64 threads for IO. This function assumes that all sockets are bound to the same IP, and will panic otherwise