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

@@ -5,11 +5,33 @@ namespace yawaflua.WebSockets.Models.Interfaces;
public interface IWebSocketClient
{
/// <summary>
/// ID of user
/// </summary>
public Guid Id { get; }
/// <summary>
/// Path, that user connects
/// </summary>
public string Path { get; }
/// <summary>
/// Connection info
/// </summary>
public ConnectionInfo? ConnectionInfo { get; }
/// <summary>
/// You can provides Items, like in auth middleware or any
/// </summary>
public IDictionary<object, object>? Items { get; set; }
/// <summary>
/// HttpRequest data
/// </summary>
public HttpRequest? HttpRequest { get; }
/// <summary>
/// You should`nt use it, but, its full work with user
/// </summary>
internal WebSocket webSocket { get; }
/// <summary>
/// Kick client
/// </summary>
/// <returns>null</returns>
public Task Abort();
}