[MMO] Centrifugo

xF2 Add-on [MMO] Centrifugo 2.2.3

No permission to download
Minimum version of Core Lib 2.2.4
The server must use centrifuge version 4
!!! To switch to v4, use the built-in config migration tool:



View attachment 31682

The following events will be available soon:
subscribed - Called when subscribed to a server-side channel upon Client moving to connected state or during connection lifetime if server sends Subscribe push message.
subscribing - Called when existing connection lost (Client reconnects) or Client explicitly disconnected. Client continue keeping server-side subscription registry with stream position information where applicable.
unsubscribed - Called when server sent unsubscribe push or server-side subscription
publication
This diagram demonstrates possible Subscription state transitions:

View attachment 31683
Add cli command: mcgo-centrifugo:info
Generate jwt token for subcription
We pass the token that we generated. Also, if an empty string is passed and you do not need to generate tokens every time for guests, specify in the setting

PHP:
"anonymous": true
"client_anonymous": true

If you are using our add-ons, then you must remove these options from the configuration. Because they are no longer relevant.
If you are using the live threads add-on ([MMO] Live Threads)
You must add a namespace. Example configuration with live threads:

PHP:
{
  "token_hmac_secret_key": "",
  "admin_password": "",
  "admin_secret": "",
  "api_key": "",
  "allowed_origins": [
    "your_hosting",
  ],
  "namespaces": [
    {
      "name": "public"
    }
  ]
}
  • Like
Reactions: BattleKing
Top