From 2bbfcb0d1600a5ab8d58bad1341118de4fed8951 Mon Sep 17 00:00:00 2001 From: "Alecio Furanze (Ale)" Date: Sat, 29 Jun 2024 02:57:16 +0200 Subject: [PATCH] Update HTTP.WebSocketOn.cs --- src/http/partials/Websocket/HTTP.WebSocketOn.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/http/partials/Websocket/HTTP.WebSocketOn.cs b/src/http/partials/Websocket/HTTP.WebSocketOn.cs index f4071a7b..2050d78f 100644 --- a/src/http/partials/Websocket/HTTP.WebSocketOn.cs +++ b/src/http/partials/Websocket/HTTP.WebSocketOn.cs @@ -12,7 +12,7 @@ internal class WebsocketOn : IHTTP.WebSocketOn public EventHandler OnClose { get; private set; } public EventHandler<(byte[] buffer, HTTP.MessageType messageType)> OnData { get; private set; } public EventHandler OnError { get; private set; } - public EventHandler<(string name, byte[] buffer)> OnEvent { get; private set; } + public EventHandler<(string name, byte[] buffer, HTTP.MessageType messageType)> OnEvent { get; private set; } public EventHandler OnModify { get; private set; } public EventHandler OnOpen { get; private set; } @@ -42,10 +42,10 @@ public void Data(Action callback) Env.MainThread.Add(() => callback?.Invoke(@event.buffer, @event.messageType)); } - public void Event(Action callback) + public void Event(Action callback) { OnEvent += (@object, @event) => - Env.MainThread.Add(() => callback?.Invoke(@event.name, @event.buffer)); + Env.MainThread.Add(() => callback?.Invoke(@event.name, @event.buffer, @event.messageType)); } public void Close(Action callback)