diff options
author | Felix Lange <fjl@twurst.com> | 2015-10-30 05:54:44 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-10-30 05:54:44 +0800 |
commit | f570b68ed107d5e835a71cf1194e2b82c496a387 (patch) | |
tree | 69073046c5ef6900f88284b16ac716ec64a1e34b /p2p/nat | |
parent | bf11a47f22311a21639fa4f7794a41cf2f9b809e (diff) | |
download | dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.tar dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.tar.gz dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.tar.bz2 dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.tar.lz dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.tar.xz dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.tar.zst dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.zip |
p2p/nat: add docs for discover
Diffstat (limited to 'p2p/nat')
-rw-r--r-- | p2p/nat/natupnp.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go index c544fbcb6..890a35043 100644 --- a/p2p/nat/natupnp.go +++ b/p2p/nat/natupnp.go @@ -133,6 +133,9 @@ func discoverUPnP() Interface { return nil } +// finds devices matching the given target and calls matcher for all +// advertised services of each device. The first non-nil service found +// is sent into out. If no service matched, nil is sent. func discover(out chan<- *upnp, target string, matcher func(*goupnp.RootDevice, goupnp.ServiceClient) *upnp) { devs, err := goupnp.DiscoverDevices(target) if err != nil { |