mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-15 14:19:29 +00:00
32 lines
962 B
C#
32 lines
962 B
C#
using System.Threading.Tasks;
|
|
using System.Threading;
|
|
|
|
namespace System.Net.WebSockets;
|
|
|
|
public interface IClientWebSocket<TScope>
|
|
{
|
|
WebSocketCloseStatus? CloseStatus { get; }
|
|
|
|
string CloseStatusDescription { get; }
|
|
|
|
ClientWebSocketOptions Options { get; }
|
|
|
|
WebSocketState State { get; }
|
|
|
|
string SubProtocol { get; }
|
|
|
|
void Abort();
|
|
|
|
Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken);
|
|
|
|
Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken);
|
|
|
|
Task ConnectAsync(Uri uri, CancellationToken cancellationToken);
|
|
|
|
void Dispose();
|
|
|
|
Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken);
|
|
|
|
Task SendAsync(ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken);
|
|
}
|