Symple module

Roster

The [Roster]({#ref classicy_1_1smpl_1_1Roster #}) provides a registry for active network peers indexed by session ID.

Roster

#include <icy/symple/roster.h>

Inherits: string, Peer >

The Roster provides a registry for active network peers indexed by session ID.

Public Attributes

ReturnNameDescription
Signal< void(Peer &)>PeerAddedLifecycle signals for external observers (samples, UI).
Signal< void(constPeer &)>PeerRemoved

PeerAdded

Signal< void(Peer &)> PeerAdded

Lifecycle signals for external observers (samples, UI).


PeerRemoved

Signal< void(constPeer &)> PeerRemoved

Public Methods

ReturnNameDescription
Roster
Peer *getByHostReturns the first peer which matches the given host address.
Mappeers constReturns a deep copy of the peer map.
voidprint const
constchar *className virtual const inline

Roster

Roster()

getByHost

Peer * getByHost(std::string_view host)

Returns the first peer which matches the given host address.


peers

const

Map peers() const

Returns a deep copy of the peer map.


print

const

void print(std::ostream & os) const

className

virtual const inline

virtual inline constchar * className() const

Protected Methods

ReturnNameDescription
voidonAdd inline
voidonRemove inline

onAdd

inline

inline void onAdd(const std::string &, Peer * peer)

onRemove

inline

inline void onRemove(const std::string &, Peer * peer)