natpmp

package
v0.0.0-...-6562eda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2015 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NatPmpPortMap

type NatPmpPortMap struct {
	State *PortMapState
	// contains filtered or unexported fields
}

func AddPortMappingForAnyExternalPort

func AddPortMappingForAnyExternalPort(internalPort uint16, onStateChanging *func(*PortMapState)) (*NatPmpPortMap, error)

onStateChanging callback is invoked synchronously just before PortMapState is about to change, so your existing NatPmpPortMap.State will represent the old state, and the arg to onStateChanging will be the new.

func (*NatPmpPortMap) Close

func (pm *NatPmpPortMap) Close()

Close releases the port mapping. The onStateChanging callback will not be called for this operation.

type PortMapState

type PortMapState struct {
	ExternalIp   string
	ExternalPort uint16
	InternalPort uint16
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL