XenForo WebSockets

XenForo WebSockets 2.0.2

Upgrade No permission to download
Premium
Developer
Jun 11, 2020
557
443
63
021 updated [021] XenForo WebSockets with a new update entry:

1.1.3

Updated config for supervisorctl in setup helper script to properly stop soketi server processes.

For those who have already configured the soketi service on supervisorctl, it is recommended to do the following:
  • Stop soketi service supervisorctl stop soketi.your_domain.com
  • Kill all soketi server process: pkill -f soketi
  • Add the following content to the service config (usually located in one of the folders: /etc/supervisor/conf.d...

Read the rest of this update entry...
 
Mar 7, 2023
78
28
18
As a professional XenForo 2.2 developer, leveraging WebSocket technology can significantly improve the performance and user experience of the forum software. WebSocket enables real-time, bidirectional communication between the server and the client, reducing latency and increasing responsiveness. Here are some suggestions to implement WebSocket technology in XenForo:

  1. Real-time notifications: Use WebSockets to implement real-time notifications for new private messages, replies, likes, and other user interactions. This can enhance user engagement and encourage quicker responses.
  2. Live chat system: Develop a live chat system using WebSocket technology for direct communication between users. This can foster a sense of community and provide a more interactive user experience.
  3. Online user list: Use WebSocket connections to display an updated list of online users in real-time, providing a better sense of community and activity on the forum.
  4. Real-time content updates: Implement real-time updates for new posts, threads, and other content changes without requiring a page refresh. This can create a smoother browsing experience for users.
  5. Live search: Utilize WebSockets to provide real-time search results as users type their queries, delivering faster and more relevant results.
  6. Content collaboration: Enable real-time collaborative editing of posts, articles, or documents, allowing multiple users to work on the same content simultaneously.
  7. Scalability: Optimize the WebSocket implementation for better scalability, ensuring that the system can handle a large number of concurrent connections without performance issues.
  8. Security: Implement secure WebSocket connections (WSS) to protect user data and communications. Additionally, use authentication and authorization methods to control access to WebSocket resources.
  9. Progressive enhancement: Ensure that the forum still functions properly for users with older browsers or unreliable network connections that don't support WebSocket technology. Use feature detection and fallback mechanisms to provide the best experience possible for all users.
  10. Performance monitoring: Monitor WebSocket connections and performance to identify potential bottlenecks, resource usage, and areas for optimization.
By incorporating WebSocket technology into your XenForo development, you can significantly improve the performance and user experience, leading to increased user satisfaction and engagement.

ChatGPT
 
  • Like
Reactions: 021
Jun 26, 2023
5
1
3
@021
Thanks for the websocket addons,
I think there is should be somekind of simple live statistic info or logs from xenforo admin panel.
 
Jun 26, 2023
5
1
3
So I was wrong about realtime chat, sorry.

config.png

Should I filling in the details from the soketi config details from soketi.config.json ?
 
Jun 26, 2023
5
1
3
I have, even re-reading your guide one per-line but something must be I have missed :

My nginx conf :
Code:
    map $http_upgrade $connection_upgrade
    {
        default upgrade;
        '' close;
    }
    server
    {
        include ssl-params.conf;
        include ssl.conf;
        # Comment if using an ssl certificate.
        listen 2096 ssl http2;

        server_name forum.test.tl;
        server_tokens off;
        root /var/www/html/forum;
        index index.php;

        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";

        charset utf-8;

        location /
        {
            proxy_pass http://127.0.0.1:6001;
            proxy_read_timeout 60;
            proxy_connect_timeout 60;
            proxy_redirect off;

            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }
 
Premium
Developer
Jun 11, 2020
557
443
63
I have, even re-reading your guide one per-line but something must be I have missed :

My nginx conf :
Code:
    map $http_upgrade $connection_upgrade
    {
        default upgrade;
        '' close;
    }
    server
    {
        include ssl-params.conf;
        include ssl.conf;
        # Comment if using an ssl certificate.
        listen 2096 ssl http2;

        server_name forum.test.tl;
        server_tokens off;
        root /var/www/html/forum;
        index index.php;

        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";

        charset utf-8;

        location /
        {
            proxy_pass http://127.0.0.1:6001;
            proxy_read_timeout 60;
            proxy_connect_timeout 60;
            proxy_redirect off;

            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }
 
  • Like
Reactions: echelon
Premium
Developer
Jun 11, 2020
557
443
63
021 updated [021] XenForo WebSockets with a new update entry:

2.0.0

The getWebsocketsPromise method has been introduced, which allows you to execute code after the XF.Echo and XF.EchoManager objects are ready to work. This method should improve the stability of add-ons based on XenForo WebSockets.

Support for the Keep Alive XenForo system that updates the CSRF token when a tab is restored in browsers on mobile devices. This will get rid of such errors: Cookie Required To Use This Site, Security Error.

Read the rest of this update entry...
 
Mar 6, 2023
15
17
3
Running on CentOS 7. So I installed Soketi in a docker container on the same server as xenforo.

The following means the soketi is running successfully?

systemctl status soketi.my.com

CSS:
[10:21][root@beta public]# systemctl status soketi.my.com
● soketi.my.com.service - Websockets server for my.com
   Loaded: loaded (/etc/systemd/system/soketi.my.com.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2023-11-03 21:42:25; 1 weeks 1 days ago
 Main PID: 38813 (bash)
    Tasks: 9
   Memory: 9.0M
   CGroup: /system.slice/soketi.my.com.service
           ├─38813 /bin/bash websockets start-docker
           └─38825 docker run -e SOKETI_DEFAULT_APP_SECRET=RCAelllailqdjg4jlkOU8hljljjFhZ2P27rynD4...

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[10:22][root@beta public]#

1699756317270.png

But when I tried to use Messenger, it always showed Connecting...

1699756153872.png

What else should I configure after installing the soketi?