Crate solana_net_utils

Crate solana_net_utils 

Source
👎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§

socketsDeprecated
token_bucketDeprecated
This module contains TokenBucket, which provides ability to limit rate of certain events, while allowing bursts through. KeyedRateLimiter allows to rate-limit multiple keyed items, such as connections.

Structs§

SocketConfigDeprecated
UdpSocketPairDeprecated
A data type representing a public Udp socket

Constants§

DEFAULT_IP_ECHO_SERVER_THREADSDeprecated
MAX_PORT_COUNT_PER_MESSAGEDeprecated
MINIMUM_IP_ECHO_SERVER_THREADSDeprecated
MINIMUM_VALIDATOR_PORT_RANGE_WIDTHDeprecated
VALIDATOR_PORT_RANGEDeprecated

Functions§

bind_commonDeprecated
binds both a UdpSocket and a TcpListener
bind_common_in_range_with_configDeprecated
Find a port in the given range with a socket config that is available for both TCP and UDP
bind_common_with_configDeprecated
binds both a UdpSocket and a TcpListener on the same port
bind_in_rangeDeprecated
bind_in_range_with_configDeprecated
bind_more_with_configDeprecated
bind_toDeprecated
bind_to_localhostDeprecated
bind_to_unspecifiedDeprecated
bind_to_with_configDeprecated
bind_to_with_config_non_blockingDeprecated
bind_two_in_range_with_offsetDeprecated
bind_two_in_range_with_offset_and_configDeprecated
bind_with_any_port_with_configDeprecated
find_available_port_in_rangeDeprecated
Searches for an open port on a given binding ip_addr in the provided range.
find_available_ports_in_rangeDeprecated
Searches for several ports on a given binding ip_addr in the provided range.
get_cluster_shred_versionDeprecated
Retrieves cluster shred version from Entrypoint address provided.
get_cluster_shred_version_with_bindingDeprecated
Retrieves cluster shred version from Entrypoint address provided, binds client-side socket to the IP provided.
get_public_ip_addrDeprecated
Determine the public IP address of this machine by asking an ip_echo_server at the given address.
get_public_ip_addr_with_bindingDeprecated
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_serverDeprecated
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_hostDeprecated
is_host_portDeprecated
multi_bind_in_range_with_configDeprecated
binds num sockets to the same port in a range with config
parse_hostDeprecated
parse_host_portDeprecated
parse_port_or_addrDeprecated
parse_port_rangeDeprecated
verify_all_reachable_tcpDeprecated
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_udpDeprecated
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§

IpEchoServerDeprecated
PortRangeDeprecated