Codebase list golang-github-jackpal-go-nat-pmp / 7663473
Document that calls can take a long time to complete. Jack Palevich 5 years ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4848 }
4949
5050 // Get the external address of the router.
51 //
52 // Note that this call can take up to 128 seconds to return.
5153 func (n *Client) GetExternalAddress() (result *GetExternalAddressResult, err error) {
5254 msg := make([]byte, 2)
5355 msg[0] = 0 // Version 0
7072 PortMappingLifetimeInSeconds uint32
7173 }
7274
73 // Add (or delete) a port mapping. To delete a mapping, set the requestedExternalPort and lifetime to 0
75 // Add (or delete) a port mapping. To delete a mapping, set the requestedExternalPort and lifetime to 0.
76 // Note that this call can take up to 128 seconds to return.
7477 func (n *Client) AddPortMapping(protocol string, internalPort, requestedExternalPort int, lifetime int) (result *AddPortMappingResult, err error) {
7578 var opcode byte
7679 if protocol == "udp" {