Provide Links() method in Tunnel

This commit is contained in:
Asim Aslam
2019-09-04 15:41:57 +01:00
parent 7ab3934eb7
commit d559ce9da2
4 changed files with 40 additions and 20 deletions

View File

@@ -911,6 +911,19 @@ func (t *tun) Listen(channel string) (Listener, error) {
return tl, nil
}
func (t *tun) Links() []Link {
t.RLock()
defer t.RUnlock()
var links []Link
for _, link := range t.links {
links = append(links, link)
}
return links
}
func (t *tun) String() string {
return "mucp"
}