voryx / thruway-subscription-meta
Subscription Meta Module for Thruway library
Installs: 8 849
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 0
Open Issues: 1
Requires
- voryx/thruway: ^0.4.2 | ^0.5.0
Requires (Dev)
- phpunit/phpunit: ^5.5.4
This package is auto-updated.
Last update: 2024-11-19 09:42:18 UTC
README
- Thruway Subscription Meta Module
This is a module for the Thruway router that provides subscription meta events.
This module only implements the events portion of the spec.
This module does not group subscriptions. Every subscription will cause a on_create
and on_subscribe
event.
- Use
The module can be added to the router to provide meta events for all realms:
$router = new Router(); $router->registerModules([ new RatchetTransportProvider(), new SubscriptionMetaModule() ]); $router->start();
or as a realm module to provide meta events on individual realms:
$router = new Router(); $router->registerModules([ new RatchetTransportProvider() ]); $realm = $router->getRealmManager()->getRealm('some_realm'); $realm->addModule(new SubscriptionMetaModule()); $router->start();