adds comments, OOP incapsulation and publish package to nuget

This commit is contained in:
Dmitri Shimanski
2025-03-29 02:54:54 +03:00
parent 2ba9667a01
commit 1b1eb17bee
11 changed files with 103 additions and 19 deletions

View File

@@ -7,9 +7,18 @@ namespace yawaflua.WebSockets.Models.Abstracts;
public abstract class WebSocketController : IWebSocketController
{
/// <summary>
/// WebsocketManager provides work with all clients
/// </summary>
public IWebSocketManager WebSocketManager => new WebSocketManager();
public virtual Task OnMessageAsync(WebSocket webSocket, HttpContext httpContext)
/// <summary>
/// Example of function OnMessage
/// </summary>
/// <param name="webSocket">WebSocket with provided data about user e.t.c.</param>
/// <param name="httpContext">Http context of request</param>
/// <returns></returns>
public virtual Task OnMessageAsync(IWebSocket webSocket, HttpContext httpContext)
{
return Task.CompletedTask;
}