Struct p2p::P2p[][src]

pub struct P2p { /* fields omitted */ }

P2p allows you to manage how NAT traversal works.

You can edit rendezvous (traversal) servers, enable/Disable IGD use, etc.

Methods

impl P2p
[src]

Check if IGD for rendezvous connections option is on or off.

Try to use IGD port mapping when doing rendezvous connections.

Don't use IGD port mapping when doing rendezvous connections.

Tests if IGD use is enabled or not. It's enabled by default.

Returns the value of force_use_local_port option.

If this option is on, when public address is determined, use our local listening port as external as well.

By default p2p attempts to use IGD to open external ports for it's own use. Use this function to disable such behaviour.

Re-enables IGD use.

Tell about a TcpTraversalServer than can be used to help use perform rendezvous connects and hole punching.

Tells the library to forget a TcpTraversalServer previously added with add_tcp_traversal_server.

Returns a iterator over all tcp traversal server addresses.

Tell about a UdpTraversalServer than can be used to help use perform rendezvous connects and hole punching.

Tells the library to forget a UdpTraversalServer previously added with add_udp_traversal_server.

Returns an iterator over all udp traversal server addresses added with add_tcp_traversal_server.

Returns a Stream of traversal servers.

Trait Implementations

impl Default for P2p
[src]

Returns the "default value" for a type. Read more

impl Clone for P2p
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for P2p

impl Sync for P2p