Ditto 4.1.0
Public Member Functions | List of all members
ditto::Presence Class Reference

#include <Presence.hpp>

Public Member Functions

PresenceObserver observe (PresenceCallback presence_cb)
 This will run the provided callback when peers are updated. More...
 
PresenceGraph exec ()
 Return an immediate representation of known peers. More...
 

Detailed Description

The Presence allow the user to monitor peers in the mesh

Member Function Documentation

◆ exec()

PresenceGraph ditto::Presence::exec ( )

Return an immediate representation of known peers.

Returns
PresenceGraph graph of known peers

◆ observe()

PresenceObserver ditto::Presence::observe ( PresenceCallback  presence_cb)

This will run the provided callback when peers are updated.

Parameters
presence_cbcallback that will be run when the peers are updated
Returns
PresenceObserver handle to drop to stop observing peers;