From 15516c0498c2eecd2de42b55dea40f0063390637 Mon Sep 17 00:00:00 2001 From: Kerry Jiang Date: Sat, 20 Jul 2024 11:01:56 -0700 Subject: [PATCH] added more things in the interface --- src/WebSocket4Net/IWebSocket.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/WebSocket4Net/IWebSocket.cs b/src/WebSocket4Net/IWebSocket.cs index 363d23d..ffca278 100644 --- a/src/WebSocket4Net/IWebSocket.cs +++ b/src/WebSocket4Net/IWebSocket.cs @@ -2,6 +2,7 @@ using System.Buffers; using System.Threading; using System.Threading.Tasks; +using SuperSocket.Client; using SuperSocket.WebSocket; namespace WebSocket4Net @@ -10,6 +11,10 @@ public interface IWebSocket { ValueTask OpenAsync(CancellationToken cancellationToken = default); + void StartReceive(); + + event PackageHandler PackageHandler; + ValueTask ReceiveAsync(); ValueTask SendAsync(string message); @@ -19,5 +24,7 @@ public interface IWebSocket ValueTask SendAsync(ref ReadOnlySequence sequence); ValueTask CloseAsync(CloseReason closeReason, string message = null); + + event EventHandler Closed; } } \ No newline at end of file