Skip to content

Commit f570b68

Browse files
committed
p2p/nat: add docs for discover
1 parent bf11a47 commit f570b68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

p2p/nat/natupnp.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ func discoverUPnP() Interface {
133133
return nil
134134
}
135135

136+
// finds devices matching the given target and calls matcher for all
137+
// advertised services of each device. The first non-nil service found
138+
// is sent into out. If no service matched, nil is sent.
136139
func discover(out chan<- *upnp, target string, matcher func(*goupnp.RootDevice, goupnp.ServiceClient) *upnp) {
137140
devs, err := goupnp.DiscoverDevices(target)
138141
if err != nil {

0 commit comments

Comments
 (0)