Skip to content

Commit

Permalink
added more things in the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryjiang committed Jul 20, 2024
1 parent 8bbb61b commit 15516c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/WebSocket4Net/IWebSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Buffers;
using System.Threading;
using System.Threading.Tasks;
using SuperSocket.Client;
using SuperSocket.WebSocket;

namespace WebSocket4Net
Expand All @@ -10,6 +11,10 @@ public interface IWebSocket
{
ValueTask<bool> OpenAsync(CancellationToken cancellationToken = default);

void StartReceive();

event PackageHandler<WebSocketPackage> PackageHandler;

ValueTask<WebSocketPackage> ReceiveAsync();

ValueTask SendAsync(string message);
Expand All @@ -19,5 +24,7 @@ public interface IWebSocket
ValueTask SendAsync(ref ReadOnlySequence<byte> sequence);

ValueTask CloseAsync(CloseReason closeReason, string message = null);

event EventHandler Closed;
}
}

0 comments on commit 15516c0

Please sign in to comment.