mirror of
https://github.com/yawaflua/WebSockets.git
synced 2025-12-16 01:46:19 +02:00
adds comments, OOP incapsulation and publish package to nuget
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user