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

@@ -4,7 +4,7 @@ using yawaflua.WebSockets.Models.Interfaces;
namespace yawaflua.WebSockets.Core;
public class WebSocket : IDisposable
internal class WebSocket : IWebSocket
{
private readonly System.Net.WebSockets.WebSocket _webSocket;
private readonly WebSocketReceiveResult? _webSocketReceiveResult;
@@ -16,7 +16,7 @@ public class WebSocket : IDisposable
public string? CloseStatusDescription => _webSocket.CloseStatusDescription;
public string? Message => _message;
public WebSocketMessageType? MessageType => _webSocketReceiveResult?.MessageType;
public IWebSocketClient Client;
public IWebSocketClient Client { get; }
internal WebSocket(System.Net.WebSockets.WebSocket webSocket, WebSocketReceiveResult? webSocketReceiveResult, string? message, IWebSocketClient client)
{
_webSocket = webSocket;