Documentation ¶
Overview ¶
Package natpmp provides an implementation of NAT-PMP. See https://tools.ietf.org/html/rfc6886
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExternalAddress ¶
ExternalAddress returns the external address the internet sees you as having.
func MapTCP ¶
MapTCP maps the specified TCP port for external access. It returns the port on the external address that can be used to connect to the internal port. If you wish to be notified of changes to the external port mapping, provide a notify channel. It will be sent an int containing the updated external port mapping when it changes or an error if a renewal fails. The channel will only be sent to if it is ready.
func MapUDP ¶
MapUDP maps the specified UDP port for external access. It returns the port on the external address that can be used to connect to the internal port. If you wish to be notified of changes to the external port mapping, provide a notify channel. It will be sent an int containing the updated external port mapping when it changes or an error if a renewal fails. The channel will only be sent to if it is ready.
Types ¶
This section is empty.