Summary Update.

This commit is contained in:
2026-06-06 23:38:50 -04:00
parent dd75ca4b06
commit 2916d17868
30 changed files with 1231 additions and 21 deletions

View File

@@ -1,3 +1,23 @@
// =============================================================================
// RelayServer entrypoint.
//
// Boot sequence:
// 1. Connect to SurrealDB (port 8000) via SurrealService.
// 2. Wire static singletons onto ChatSocketBehavior (it's a WebSocketSharp
// WebSocketBehavior, so DI is impossible — fields are static).
// 3. Run ServerBootstrapService.InitializeAsync — seeds users, server, members,
// channels (welcome, general, files, voice-general), roles, role assignments,
// channel permission overrides, and encryption keys. Idempotent across reboots.
// 4. Start two listeners in parallel:
// - HTTP API on 127.0.0.1:5000 (RtcEndpoints — REST for RTC call orchestration)
// - WebSocket server on 127.0.0.1:5001 (ChatSocketBehavior — the chat/RTC-signal pipe)
// 5. Block on ConsoleCommandService.ShutdownTokenSource for graceful shutdown.
//
// Why two listeners? The HTTP API is used for one-shot RPC-style calls (e.g. "fetch
// the participant list for this voice channel"). The WebSocket is the persistent
// duplex pipe used for chat, typing, presence, encrypted RTC signalling.
// =============================================================================
using RelayServer.Endpoints;
using RelayServer.Services.Chat;
using RelayServer.Services.Core;