[MMO] Centrifugo

[MMO] Centrifugo 2.3.0 Beta 1

No permission to download
Support XF 2.3.0
Min require XF 2.3.0 Beta 3
Update js code (thx @NikitOS)
  • Like
Reactions: NikitOS
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:
When using the addition of live conversations or threads, it does not go to the last message, but remains in the same position. On large forums, this causes discomfort.
Added new triggers and their handling, now you can inline your code while connecting to a socket and when you connected to it.
In case of successful connection Client states will transition like this:
disconnected (initial) -> connecting (on('connecting') called) -> connected (on('connected') called).
In case of already connected Client temporary lost a connection with a server and then successfully reconnected:
connected -> connecting (on('connecting') called) -> connected (on('connected') called).
In case of already connected Client temporary lost a connection with a server, but got a terminal error upon reconnection:
connected -> connecting (on('connecting') called) -> disconnected (on('disconnected') called).
In case of already connected Client came across terminal condition (for example, if during a connection token refresh application found that user has no permission to connect anymore):
connected -> disconnected (on('disconnected') called).
Both connecting and disconnected events have numeric code and human-readable string reason in their context, so you can look at them and find the exact reason why the Client went to the connecting state or to the disconnected state.
This diagram demonstrates possible Client state transitions:
client_state-34264b7a7eee2792baa58bb5bb525d46.png

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:
sub_state-9dbaf6d2a6868264a330b1a3f4c59b39.png
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
JSON:
"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 (https://xenforo.com/community/resources/mmo-live-threads.8777/)
You must add a namespace. Example configuration with live threads:
JSON:
{
  "token_hmac_secret_key": "",
  "admin_password": "",
  "admin_secret": "",
  "api_key": "",
  "allowed_origins": [
    "your_hosting",
  ],
  "namespaces": [
    {
      "name": "public"
    }
  ]
}
You can find information about namespaces here:
Add new options host address and path
Add information on admin dashboard
Add missing requirement add-on [MMO] Core Library
Screen.webp

Screen 2.webp
  • Like
Reactions: prisnilos
Top Bottom