From muchq/MoonBase#1590 (games_hub voice signaling), opal-cpp note 3. Nice to have.
With Options::queue_while_detached, everything queued during grace is delivered on Resume. Some of it is stale by then. For example, WebRTC signaling for peer connections that no longer exist. There is no way to shed it short of not queuing it at all.
Proposal
Options::on_resume_filter, a std::function<bool(const Tx&)> that runs over the retained queue at Resume and returns true to keep an event. Unset means today's behaviour.
games_hub avoids needing this by ending voice on Detach, so this is low priority. If #227 (delivery classes) lands, consider whether a class-based rule ("droppable events don't survive detach") covers this instead of a separate callback.
Tests
- A filter that rejects one event kind: after
Resume, only the other kinds are delivered, in order.
- Unset filter: every retained event is delivered, same as today.
From muchq/MoonBase#1590 (games_hub voice signaling), opal-cpp note 3. Nice to have.
With
Options::queue_while_detached, everything queued during grace is delivered onResume. Some of it is stale by then. For example, WebRTC signaling for peer connections that no longer exist. There is no way to shed it short of not queuing it at all.Proposal
Options::on_resume_filter, astd::function<bool(const Tx&)>that runs over the retained queue atResumeand returns true to keep an event. Unset means today's behaviour.games_hub avoids needing this by ending voice on
Detach, so this is low priority. If #227 (delivery classes) lands, consider whether a class-based rule ("droppable events don't survive detach") covers this instead of a separate callback.Tests
Resume, only the other kinds are delivered, in order.