The header of ULagos 360° displays a real-time connection indicator at all times. A green Wifi icon means the Socket.IO connection to the backend is active and space updates are broadcast instantly to every tutor on the network. A red WifiOff icon means the connection has been lost — no live updates will arrive, but the app continues to function and stores every change locally until the connection is restored.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Pewiz/ulagos360/llms.txt
Use this file to discover all available pages before exploring further.
Connection States
Connected
When the Socket.IO handshake withhttps://ulagos360-backend-production.up.railway.app succeeds, the header shows:
- A green
Wifiicon - The label “Conectado” (visible on
smscreens and above)
Disconnected
When the socket drops or cannot reach the server, the header switches to:- A red
WifiOfficon - The label “Desconectado” (visible on
smscreens and above)
localStorage via the Zustand spaces-storage key and the persistent backup hooks, so nothing is lost.
Auto-Reconnect Behaviour
The socket client is configured with the following reconnection parameters insideuseSocketConnection.js:
| Parameter | Value | Effect |
|---|---|---|
reconnection | true | Automatic reconnect is enabled |
reconnectionDelay | 2 000 ms | Wait 2 s before the first retry |
reconnectionAttempts | 5 | Maximum number of retries |
maxReconnectionAttempts | 5 | Hard cap on reconnection attempts |
reconnectionDelayMax | 10 000 ms | Cap each retry delay at 10 s |
randomizationFactor | 0.5 | ±50 % jitter added to each delay |
timeout | 30 000 ms | Connection attempt timeout |
forceNew | false | Reuse existing socket if available |
autoConnect | true | Connect immediately on creation |
withCredentials | false | No cookies or auth headers sent |
rememberUpgrade | false | Always re-negotiate transport on reconnect |
delay = min(reconnectionDelay × 2ⁿ, reconnectionDelayMax) × (1 ± randomizationFactor)
Transport Strategy
The client starts withpolling as the initial transport and automatically upgrades to websocket once the server signals it is available (upgrade: true). This ensures the connection is established even in restrictive network environments (such as university Wi-Fi) that may block raw WebSocket traffic on the first attempt.
On Reconnect: State Recovery
When the socket reconnects,useSocketConnection.js immediately re-registers the current user and requests the full server state:
get_all_spaces event triggers the server to respond with the latest space state, overwriting any stale local entries and bringing the tutor fully up to date.