Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMultipleRoutesFound = errors.New("found multiple routes in the network") ErrNoRoutersFound = errors.New("no routers offering upnp services found") )
Functions ¶
This section is empty.
Types ¶
type PortMapper ¶
type PortMapper interface { Connect(timeout time.Duration) error Close() ExternalIP() string LocalIP() string AddPersistantPortMappingToSelf( description string, protocol Protocol, externalPort uint16, forwardToPort uint16, ) error AddPersistantPortMapping( description string, protocol Protocol, externalPort uint16, forwardToPort uint16, forwardToAddr netip.Addr, ) error AddPortMappingToSelf( description string, protocol Protocol, externalPort uint16, forwardToPort uint16, timeout time.Duration, ) error AddPortMapping( description string, protocol Protocol, externalPort uint16, forwardToPort uint16, forwardToAddr netip.Addr, timeout time.Duration, ) error }
func NewPortMapper ¶
func NewPortMapper( ctx context.Context, pRefresh time.Duration, ) PortMapper
Click to show internal directories.
Click to hide internal directories.