)// ListenAddresses returns a list of addresses at which this swarm listens.func(s*Swarm)ListenAddresses()[]ma.Multiaddr{listeners:=s.swarm.Listeners()addrs:=make([]ma.Multiaddr,0,len(listeners))for_,l:=rangelisteners{
addrs=append(addrs,l2.Multiaddr())}}returnaddrs}// InterfaceListenAddresses returns a list of addresses at which this swarm// listens. It expands "any interface" addresses (/ip4/0.0.0.0, /ip6/::) to// use the known local interfaces.func(s*Swarm)InterfaceListenAddresses()([]ma.Multiaddr,error){returnaddrutil.ResolveUnspecifiedAddresses(s.ListenAddresses(),nil)}