Update: Needs Testing - Not Tested

This commit is contained in:
2026-04-04 16:17:57 -04:00
parent c89a0cf88b
commit 3f27c94032
4 changed files with 70 additions and 11 deletions

View File

@@ -0,0 +1,19 @@
using System.Text.Json;
using RelayServer.Models.Rtc;
using WebSocketSharp.Server;
namespace RelayServer.Services.Rtc;
public static class RtcNotificationService
{
public static WebSocketServer? Server { get; set; }
public static void Broadcast(RtcNotificationMessage message)
{
if (Server is null)
return;
var json = JsonSerializer.Serialize(message);
Server.WebSocketServices["/"]?.Sessions.Broadcast(json);
}
}