Struct p2p::HolePunchMediator [] [src]

pub struct HolePunchMediator { /* fields omitted */ }

The main hole punch mediator engine.

This is responsible for managing all the hole punching details. It has child states to mediate UDP and TCP rendezvous as well as UDP and TCP hole punching. The result will be published to the user via accepted callbacks.

Methods

impl HolePunchMediator
[src]

Start the mediator engine. This will prepare it for the rendezvous. Once rendezvous information is obtained via the given callback, the user is expected to exchange it out of band with the peer and begin hole punching by giving the peer's rendezvous information.

Trait Implementations

impl NatState for HolePunchMediator
[src]

To be called when timeout has been fired and the user has retrieved the state using the token stored inside the NatTimer::associated_nat_state. Read more

To be called when user wants to actively terminate this state. It will do all the necessary clean ups and resource (file/socket descriptors) cleaning freeing so merely calling this is sufficient. Read more

This is for internal use for the crate and is rarely needed.

To be called when readiness event has fired