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 ¶
Click to show internal directories.
Click to hide internal directories.