a58065871f
* Removed ConcurrentDictionary in favor of locked dictionary, and added reconnection behaviour to OnConnection * Refactored code to handle multiple ws connected at the same time and offer graceful disconnection of appropriate sockets * removed unused usings --------- Co-authored-by: Alex <clodanSPT@hotmail.com> Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
13 lines
440 B
C#
13 lines
440 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);
|
|
Task OnClose(WebSocket ws, HttpContext context, string sessionIdContext);
|
|
}
|