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 in seconds

Hole punch timeout in seconds

If we want to wait for the other, given one of TCP or UDP has hole-punched

UDP Rendezvous port. This is the port our UDP Rendezvous server will bind to and listen on.

TCP Rendezvous port. This is the port our TCP Rendezvous server will bind to and listen on.

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. 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.

Details of all our UDP hole punchers

Trait Implementations

impl Debug for Config
[src]

Formats the value using the given formatter.

impl Clone for Config
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more