Struct p2p::config::Config [] [src]

pub struct Config {
    pub rendezvous_timeout_sec: Option<u64>,
    pub hole_punch_timeout_sec: Option<u64>,
    pub udp_rendezvous_port: Option<u16>,
    pub remote_udp_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, reasonalble defaults will be used.

Fields

Rendezvous timeout in seconds

Hole punch timeout in seconds

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

Remote UDP Rendezvous servers. It is recommended to provide at-least 2 and idally 3 or more 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