Struct p2p::config::Config
[−]
[src]
pub struct Config { pub rendezvous_timeout_sec: Option<u64>, pub hole_punch_timeout_sec: Option<u64>, pub hole_punch_wait_for_other: Option<bool>, pub udp_rendezvous_port: Option<u16>, pub tcp_rendezvous_port: Option<u16>, pub remote_udp_rendezvous_servers: Vec<SocketAddr>, pub remote_tcp_rendezvous_servers: Vec<SocketAddr>, pub udp_hole_punchers: Vec<UdpHolePuncher>, }
Various configurations with which to proceed with NAT traversal.
User can opt to provide this in a file, read from it and pass it when required. For optional
fields that are None
, reasonable defaults will be used.
Fields
rendezvous_timeout_sec: Option<u64>
Rendezvous timeout in seconds
hole_punch_timeout_sec: Option<u64>
Hole punch timeout in seconds
hole_punch_wait_for_other: Option<bool>
If we want to wait for the other, given one of TCP or UDP has hole-punched
udp_rendezvous_port: Option<u16>
UDP Rendezvous port. This is the port our UDP Rendezvous server will bind to and listen on.
tcp_rendezvous_port: Option<u16>
TCP Rendezvous port. This is the port our TCP Rendezvous server will bind to and listen on.
remote_udp_rendezvous_servers: Vec<SocketAddr>
Remote UDP Rendezvous servers. It is recommended to provide at-least 2 and ideally 3 or
more for proper NAT detection or else detection (and consequently prediction) of an
Endpoint Dependent Mapping
(EDM
) NAT will fail.
remote_tcp_rendezvous_servers: Vec<SocketAddr>
Remote TCP Rendezvous servers. It is recommended to provide at-least 2 and ideally 3 for
proper NAT detection or else detection (and consequently prediction) of an Endpoint Dependent Mapping
(EDM
) NAT will fail.
udp_hole_punchers: Vec<UdpHolePuncher>
Details of all our UDP hole punchers
Trait Implementations
impl Debug for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more