oxen-mq
oxen-mq copied to clipboard
feature request: Connection ID groups
oxend rpc code, pysogs and many other code bases would greatly benefit from adding / removing connection ids into a group and being able to send to the group and everyone in the group gets that message sent to them.
Something akin to:
struct BuddyGroup
{
std::unordered_set<ConnectionID> _buddies;
void add(ConnectionID);
void remove(ConnectionID);
template<typename Args>
void send(Args && ...) const; // blah blah blah send to all the buddies
};
I think it would be simpler for the API to just be able to pass an unordered_set of ConnectionIDs as the first argument to omq.send(...) -- no need to store an (invalidatable) reference to the OxenMQ, and no need to wrap the unordered_set capabilities.
true.