<PackageReference Include="NETStandard.Library" Version="2.0.1" />

System.Net.WebSockets.WebSocket

public abstract class WebSocket : IDisposable
public static TimeSpan DefaultKeepAliveInterval { get; }

public abstract WebSocketCloseStatus? CloseStatus { get; }

public abstract string CloseStatusDescription { get; }

public abstract WebSocketState State { get; }

public abstract string SubProtocol { get; }

protected WebSocket()

public static ArraySegment<byte> CreateClientBuffer(int receiveBufferSize, int sendBufferSize)

public static WebSocket CreateClientWebSocket(Stream innerStream, string subProtocol, int receiveBufferSize, int sendBufferSize, TimeSpan keepAliveInterval, bool useZeroMaskingKey, ArraySegment<byte> internalBuffer)

public static ArraySegment<byte> CreateServerBuffer(int receiveBufferSize)

protected static bool IsStateTerminal(WebSocketState state)

public static void RegisterPrefixes()

protected static void ThrowOnInvalidState(WebSocketState state, WebSocketState[] validStates)

public abstract void Abort()

public abstract Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)

public abstract Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)

public abstract void Dispose()

public abstract Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken)

public abstract Task SendAsync(ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)