Skip to main content

map_port

Function map_port 

Source
pub async fn map_port(
    internal_port: u16,
    lifetime_s: u32,
) -> Option<PortMapping>
Expand description

Ask the router to forward internal_port/UDP to us, trying PCP, NAT-PMP and UPnP in that order. None when nothing succeeds (no gateway, CGNAT, UPnP disabled, double NAT). Never panics.