using Microsoft.AspNetCore.Http; using yawaflua.WebSockets.Core; using yawaflua.WebSockets.Models.Interfaces; using WebSocketManager = yawaflua.WebSockets.Core.WebSocketManager; namespace yawaflua.WebSockets.Models.Abstracts; public abstract class WebSocketController : IWebSocketController { /// /// WebsocketManager provides work with all clients /// public IWebSocketManager WebSocketManager => new WebSocketManager(); /// /// Example of function OnMessage /// /// WebSocket with provided data about user e.t.c. /// Http context of request /// public virtual Task OnMessageAsync(IWebSocket webSocket, HttpContext httpContext) { return Task.CompletedTask; } }