Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(provider DiscoverFunc)
Types ¶
type Address ¶
Address is essentially net.TCPAddr yet is more general, and has a few helper methods which reduce boilerplate code.
type DiscoverFunc ¶
type Mapping ¶
type Mapping struct {
// contains filtered or unexported fields
}
func (*Mapping) ExternalAddresses ¶
func (*Mapping) OnChanged ¶
func (m *Mapping) OnChanged(subscribed MappingChangeSubscriber)
type MappingChangeSubscriber ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service runs a loop for discovery of IGDs (Internet Gateway Devices) and setup/renewal of a port mapping.
func (*Service) NewMapping ¶
func (*Service) RemoveMapping ¶
RemoveMapping does not actually remove the mapping from the IGD, it just internally removes it which stops renewing the mapping. Also, it clears any existing mapped addresses from the mapping, which as a result should cause discovery to reannounce the new addresses.
Click to show internal directories.
Click to hide internal directories.