Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 973 Bytes

README.md

File metadata and controls

36 lines (27 loc) · 973 Bytes
  • 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();