Files
SPT-Server-Build/Libraries/SPTarkov.Server.Core/Servers/Ws/IWebSocketConnectionHandler.cs
T
Jesse 2ff286e5ed Handle closure of WebSockets better, improve formatting of code (#383)
* Handle closure of WebSockets better, improve formatting of code

* Update comment
2025-06-09 08:56:07 +01:00

16 lines
579 B
C#

using System.Net.WebSockets;
namespace SPTarkov.Server.Core.Servers.Ws;
public interface IWebSocketConnectionHandler
{
string GetHookUrl();
string GetSocketId();
Task OnConnection(WebSocket ws, HttpContext context, string sessionIdContext);
Task OnMessage(byte[] rawData, WebSocketMessageType messageType, WebSocket ws, HttpContext context);
/// <summary>
/// OnClose event of a WebSocket, it should already be assumed here that the WebSocket is closed.
/// </summary>
Task OnClose(WebSocket ws, HttpContext context, string sessionIdContext);
}