Skip to main content

SessionPortMapper

Trait SessionPortMapper 

Source
pub trait SessionPortMapper: Send + Sync {
    // Required methods
    fn map(
        &self,
        internal_port: u16,
        description: &str,
    ) -> Result<MappedSessionPort, MapRefusal>;
    fn unmap(&self, id: u64);
}
Expand description

Carrier-owned UDP session port mapper (UPnP, relay map, etc.).

Required Methods§

Source

fn map( &self, internal_port: u16, description: &str, ) -> Result<MappedSessionPort, MapRefusal>

Blocking, bounded by the provider (typically five seconds). Owns renewal.

Source

fn unmap(&self, id: u64)

Release a previously granted mapping.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§