MCPcopy Create free account
hub / github.com/DOSNetwork/core / GetExternalAddress

Method GetExternalAddress

p2p/nat/natpmp.go:71–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69}
70
71func (n *natpmpNAT) GetExternalAddress() (addr net.IP, err error) {
72 res, err := n.c.GetExternalAddress()
73 if err != nil {
74 return nil, err
75 }
76
77 d := res.ExternalIPAddress
78 return net.IPv4(d[0], d[1], d[2], d[3]), nil
79}
80
81func (n *natpmpNAT) addPortMapping(protocol string, externalPort, internalPort int, description string, timeout time.Duration) error {
82 n.deletePortMapping(protocol, internalPort)

Callers

nothing calls this directly

Calls 1

GetExternalAddressMethod · 0.65

Tested by

no test coverage detected