Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription meta events #362

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Ethorsen
Copy link

@Ethorsen Ethorsen commented Jan 10, 2022

Following my question at #361

Added some meta events to the router, from the Subscription Meta API.

Refs:
https://wamp-proto.org/_static/gen/wamp_latest.html#subscription-meta-events
https://crossbar.io/docs/Subscription-Meta-Events-and-Procedures/?highlight=meta#events

Did not add the subscription_meta_api to the broker as this is only a partial implementation of the whole API. It does not include the api Procedures.

Might implement the procedures in a near future.

Usage

$session->subscribe("wamp.metaevent.subscription.on_subscribe", $callbackFn);
$session->subscribe("wamp.metaevent.subscription.on_unsubscribe", $callbackFn);
$session->subscribe("wamp.metaevent.subscription.on_create", $callbackFn);
$session->subscribe("wamp.metaevent.subscription.on_delete", $callbackFn);

$callbackFn will receive $args as first argument
where
$args[0] = session meta information (the session that triggered the event)
$args[1] = subscription meta information [ uri: string, match: string ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant