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.