๐Ÿš€ EdgeOne Demo Hub

WebSocket Demonstrations with Tencent Cloud EdgeOne

About This Project

A clean PHP + browser demo for long-lived WebSocket connections

Purpose

This project demonstrates a persistent WebSocket connection where each client sees its own uptime updated every second by the server.

Features

  • Manual connect/reconnect/disconnect controls in the main UI.
  • Server-pushed per-client uptime every 10 seconds.
  • JSON message protocol (connected, uptime, ping, pong).
  • Minimal test page for quick endpoint verification.

Technology Stack

PHP (CLI sockets) WebSocket RFC6455 framing Vanilla JavaScript nginx reverse proxy WSS/TLS in production

Request Flow

  • Browser opens a WebSocket to /ericyanws (or a custom endpoint via query string).
  • Server upgrades the connection and records connected_at per client.
  • Every tick, the server publishes uptime messages for each active client.
  • Frontend updates timer and server timestamp in real time.
← Back to demo