From e7994f00b105c25ab9624649fdb645a17cdf83cf Mon Sep 17 00:00:00 2001 From: Cody Larkin Date: Mon, 6 Apr 2026 14:44:33 -0400 Subject: [PATCH] debug lines added --- RelayClient/MainPage.xaml.cs | 2 ++ RelayServer/Services/Chat/ChatSocketBehavior.cs | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/RelayClient/MainPage.xaml.cs b/RelayClient/MainPage.xaml.cs index dc362a7..b322032 100644 --- a/RelayClient/MainPage.xaml.cs +++ b/RelayClient/MainPage.xaml.cs @@ -105,6 +105,8 @@ public partial class MainPage : ContentPage return; } + hybridWebView.SendRawMessage($"[{_username}] RAW WS DATA {e.Data}"); + Console.WriteLine($"[{_username}] RAW WS DATA: {e.Data}"); try diff --git a/RelayServer/Services/Chat/ChatSocketBehavior.cs b/RelayServer/Services/Chat/ChatSocketBehavior.cs index f90afae..c0c3e48 100644 --- a/RelayServer/Services/Chat/ChatSocketBehavior.cs +++ b/RelayServer/Services/Chat/ChatSocketBehavior.cs @@ -5,6 +5,7 @@ using RelayServer.Services.Data; using RelayServer.Services.Rtc; using WebSocketSharp; using WebSocketSharp.Server; +using ErrorEventArgs = WebSocketSharp.ErrorEventArgs; namespace RelayServer.Services.Chat; @@ -77,8 +78,14 @@ public class ChatSocketBehavior : WebSocketBehavior protected override void OnClose(CloseEventArgs e) { RtcChannelPresenceService.RemoveSession(ID); + Console.WriteLine($"WebSocket closed: session={ID}, code={e.Code}, reason={e.Reason}"); base.OnClose(e); } + protected override void OnError(ErrorEventArgs e) + { + Console.WriteLine($"WebSocket error: session={ID}, message={e.Message}"); + base.OnError(e); + } /// /// Extracts a display username from a stored user record id value.