Struct libp2p_autonat::Config
source · [−]pub struct Config {
pub timeout: Duration,
pub boot_delay: Duration,
pub refresh_interval: Duration,
pub retry_interval: Duration,
pub throttle_server_period: Duration,
pub use_connected: bool,
pub confidence_max: usize,
pub max_peer_addresses: usize,
pub throttle_clients_global_max: usize,
pub throttle_clients_peer_max: usize,
pub throttle_clients_period: Duration,
}
Expand description
Config for the Behaviour
.
Fields
timeout: Duration
Timeout for requests.
boot_delay: Duration
Delay on init before starting the fist probe.
refresh_interval: Duration
Interval in which the NAT should be tested again if max confidence was reached in a status.
retry_interval: Duration
Interval in which the NAT status should be re-tried if it is currently unknown or max confidence was not reached yet.
throttle_server_period: Duration
Throttle period for re-using a peer as server for a dial-request.
use_connected: bool
Use connected peers as servers for probes.
confidence_max: usize
Max confidence that can be reached in a public / private NAT status.
Note: for NatStatus::Unknown
the confidence is always 0.
max_peer_addresses: usize
Max addresses that are tried per peer.
throttle_clients_global_max: usize
Max total dial requests done in [Config::throttle_clients_period
].
throttle_clients_peer_max: usize
Max dial requests done in [Config::throttle_clients_period
] for a peer.
throttle_clients_period: Duration
Period for throttling clients requests.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more