Symple module

Server::RoutingPolicy

Who may message whom: a direct message needs a room the sender and recipient share, and a room broadcast needs the sende

RoutingPolicy

#include <src/symple/src/server/detail.h>

struct RoutingPolicy

Defined in src/symple/src/server/detail.h:84

Who may message whom: a direct message needs a room the sender and recipient share, and a room broadcast needs the sender to be in that room.

Public Static Methods

ReturnNameDescription
boolsharesAnyRoom static
boolcanDirectMessage static
boolcanDirectMessage static
boolcanBroadcastToRoom static

sharesAnyRoom

static

static bool sharesAnyRoom(const std::unordered_set< std::string > & a, const std::unordered_set< std::string > & b)

Defined in src/symple/src/server/detail.h:86


canDirectMessage

static

static bool canDirectMessage(const ServerPeer & sender, const ServerPeer & recipient)

Defined in src/symple/src/server/detail.h:88


canDirectMessage

static

static bool canDirectMessage(const ServerPeer & sender, const VirtualPeer & recipient)

Defined in src/symple/src/server/detail.h:90


canBroadcastToRoom

static

static bool canBroadcastToRoom(const ServerPeer & sender, const std::string & room)

Defined in src/symple/src/server/detail.h:92