👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Expand description
The net_utils module assists with networking
Modules§
- sockets
Deprecated - token_
bucket Deprecated - This module contains
TokenBucket, which provides ability to limit rate of certain events, while allowing bursts through.KeyedRateLimiterallows to rate-limit multiple keyed items, such as connections.
Structs§
- Socket
Config Deprecated - UdpSocket
Pair Deprecated - A data type representing a public Udp socket
Constants§
- DEFAULT_
IP_ ECHO_ SERVER_ THREADS Deprecated - MAX_
PORT_ COUNT_ PER_ MESSAGE Deprecated - MINIMUM_
IP_ ECHO_ SERVER_ THREADS Deprecated - MINIMUM_
VALIDATOR_ PORT_ RANGE_ WIDTH Deprecated - VALIDATOR_
PORT_ RANGE Deprecated
Functions§
- bind_
common Deprecated - binds both a UdpSocket and a TcpListener
- bind_
common_ in_ range_ with_ config Deprecated - Find a port in the given range with a socket config that is available for both TCP and UDP
- bind_
common_ with_ config Deprecated - binds both a UdpSocket and a TcpListener on the same port
- bind_
in_ range Deprecated - bind_
in_ range_ with_ config Deprecated - bind_
more_ with_ config Deprecated - bind_to
Deprecated - bind_
to_ localhost Deprecated - bind_
to_ unspecified Deprecated - bind_
to_ with_ config Deprecated - bind_
to_ with_ config_ non_ blocking Deprecated - bind_
two_ in_ range_ with_ offset Deprecated - bind_
two_ in_ range_ with_ offset_ and_ config Deprecated - bind_
with_ any_ port_ with_ config Deprecated - find_
available_ port_ in_ range Deprecated - Searches for an open port on a given binding ip_addr in the provided range.
- find_
available_ ports_ in_ range Deprecated - Searches for several ports on a given binding ip_addr in the provided range.
- get_
cluster_ shred_ version Deprecated - Retrieves cluster shred version from Entrypoint address provided.
- get_
cluster_ shred_ version_ with_ binding Deprecated - Retrieves cluster shred version from Entrypoint address provided, binds client-side socket to the IP provided.
- get_
public_ ip_ addr Deprecated - Determine the public IP address of this machine by asking an ip_echo_server at the given address.
- get_
public_ ip_ addr_ with_ binding Deprecated - 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 Deprecated - 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
Deprecated - is_
host_ port Deprecated - multi_
bind_ in_ range_ with_ config Deprecated - binds num sockets to the same port in a range with config
- parse_
host Deprecated - parse_
host_ port Deprecated - parse_
port_ or_ addr Deprecated - parse_
port_ range Deprecated - verify_
all_ reachable_ tcp Deprecated - 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 Deprecated - 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
Type Aliases§
- IpEcho
Server Deprecated - Port
Range Deprecated