packagedhtimport(inet"github.com/jbenet/go-ipfs/p2p/net")// netNotifiee defines methods to be used with the IpfsDHTtypenetNotifieeIpfsDHTfunc(nn*netNotifiee)DHT()*IpfsDHT{return(*IpfsDHT)(nn)}func(nn*netNotifiee)Connected(ninet.Network,vinet.Conn){dht:=nn.DHT()select{case<-dht.Closing():return}dht.Update(dht.Context(),v.RemotePeer())}func(nn*netNotifiee)Disconnected(ninet.Network,vinet.Conn){dht:=nn.DHT()select{case<-dht.Closing():return}dht.routingTable.Remove(v.RemotePeer())}func(nn*netNotifiee)OpenedStream(ninet.Network,vinet.Stream){}func(nn*netNotifiee)ClosedStream(ninet.Network,vinet.Stream){}