diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-13 23:08:30 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-13 23:08:30 +0800 |
commit | 5c251b69282b3992512d0c17ed0063f294a0e663 (patch) | |
tree | 7842c1a6ac8394e8bebfd4f27c9222b497aaf0f6 /p2p/nat.go | |
parent | 75d164037fb9bbf75def7c5501727fd634ef124f (diff) | |
parent | bde3ff16ad98cb4ab0befc899f7f0584d21ff9a4 (diff) | |
download | go-tangerine-5c251b69282b3992512d0c17ed0063f294a0e663.tar go-tangerine-5c251b69282b3992512d0c17ed0063f294a0e663.tar.gz go-tangerine-5c251b69282b3992512d0c17ed0063f294a0e663.tar.bz2 go-tangerine-5c251b69282b3992512d0c17ed0063f294a0e663.tar.lz go-tangerine-5c251b69282b3992512d0c17ed0063f294a0e663.tar.xz go-tangerine-5c251b69282b3992512d0c17ed0063f294a0e663.tar.zst go-tangerine-5c251b69282b3992512d0c17ed0063f294a0e663.zip |
Merge branch 'fjl-poc8-net-integration' into develop
Diffstat (limited to 'p2p/nat.go')
-rw-r--r-- | p2p/nat.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/p2p/nat.go b/p2p/nat.go deleted file mode 100644 index 9b771c3e8..000000000 --- a/p2p/nat.go +++ /dev/null @@ -1,23 +0,0 @@ -package p2p - -import ( - "fmt" - "net" -) - -func ParseNAT(natType string, gateway string) (nat NAT, err error) { - switch natType { - case "UPNP": - nat = UPNP() - case "PMP": - ip := net.ParseIP(gateway) - if ip == nil { - return nil, fmt.Errorf("cannot resolve PMP gateway IP %s", gateway) - } - nat = PMP(ip) - case "": - default: - return nil, fmt.Errorf("unrecognised NAT type '%s'", natType) - } - return -} |