Appearance
HVC Ws — Endpoints & Protocol
- Project:
hvc-ws· Files:Controllers/WebSocketController.cs,Handlers/CallStatusHandler.cs
Connect
GET /ws/calls/{eventId}Upgrade to a WebSocket. The event id is embedded in the URL; the store key is the full encoded URL, so each event gets its own room.
Client messages (JSON text frames)
json
{ "op": "set", "value": { "name": "...", "page": "...", "image": "..." } }
{ "op": "list" }set— publish/update this client'sClientStatefor the room.list— request the current roster for this client.
Server behavior
- On connect, the client is registered in the room's
CallStatusStore. - On any client join/leave/state change, the store broadcasts the full state array to all clients in that room.
- When the last client disconnects, the store is removed.
Key files
| File | Role |
|---|---|
Controllers/WebSocketController.cs | Accepts WebSockets at /ws/calls/{eventId}, parses set/list messages |
Handlers/CallStatusHandler.cs | CallStatusStoreFactory (singleton) → per-room CallStatusStore + ClientInfo/ClientState |