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

Function discoverNATPMPWithAddr

p2p/nat/natpmp.go:26–34  ·  view source on GitHub ↗
(c chan NAT, ip net.IP)

Source from the content-addressed store, hash-verified

24}
25
26func discoverNATPMPWithAddr(c chan NAT, ip net.IP) {
27 client := natpmp.NewClient(ip)
28 _, err := client.GetExternalAddress()
29 if err != nil {
30 return
31 }
32
33 c <- &natpmpNAT{client, ip, make(map[int]int)}
34}
35
36type natpmpNAT struct {
37 c *natpmp.Client

Callers 1

discoverNATPMPFunction · 0.85

Calls 1

GetExternalAddressMethod · 0.65

Tested by

no test coverage detected