tuweni / org.apache.tuweni.devp2p / PeerRepository / addListener

addListener

abstract fun addListener(listener: (Peer) -> Unit): Unit (source)

Adds a listener to the repository, which will consume peer entries whenever they are added to the repository.