observe Peers V2
Deprecated
Use presence.observe() which offers a more complete picture of the network
Replace with
presence.observe()
Request information about Ditto peers in the local peer-to-peer network. The V2 observer differs from observePeers
by providing not just information about the immediate peers, but also multihop information from other peers not immediately connected. V2 presence therefore offers a more complete view of the local peer-to-peer network.
This method returns an observer which will invoke the provided lambda expression for each update. A newly registered observer will have an update delivered to it immediately. Then it will be invoked repeatedly when new information is learned about Ditto peers or their connections in the local peer-to-peer network.
When the observer is no longer required the caller must call close()
on the returned DittoPeersObserver
.
V2
Parameters
the lambda expression to be invoked when there is an update.
Deprecated
Use presence.observe() which offers a more complete picture of the network
Replace with
presence.observe()
Request information about Ditto peers in the local peer-to-peer network. The V2 observer differs from observePeers
by providing not just information about the immediate peers, but also multihop information from other peers not immediately connected. V2 presence therefore offers a more complete view of the local peer-to-peer network.
This method returns an observer which will invoke the update
method on the provided callback object for each update. A newly registered observer will have an update delivered to it immediately. Then it will be invoked repeatedly when new information is learned about Ditto peers or their connections in the local peer-to-peer network.
When the observer is no longer required the caller must call close()
on the returned DittoPeersObserver
.
V2
Parameters
an object that implements the DittoPeersObserverV2Callback interface, whose update
function will be called when there is an update.