How to use libp2p to create peer discovery and message broadcasting to all peers

Hi, I am trying to building a network where i am using DHT for peer discovery and gossip pusub for messaging. How to handle disconnection from peers so that other peers knows that some peer has disconnected ?