Table of Contents

Interface IWebSocketConnection

Namespace
NetCord.Gateway.WebSockets
Assembly
NetCord.dll
public interface IWebSocketConnection : IDisposable
Inherited Members

Properties

CloseStatus

int? CloseStatus { get; }

Property Value

int?

CloseStatusDescription

string? CloseStatusDescription { get; }

Property Value

string

Methods

Abort()

void Abort()

CloseAsync(int, string?, CancellationToken)

ValueTask CloseAsync(int closeStatus, string? closeStatusDescription, CancellationToken cancellationToken = default)

Parameters

closeStatus int
closeStatusDescription string
cancellationToken CancellationToken

Returns

ValueTask

OpenAsync(Uri, CancellationToken)

ValueTask OpenAsync(Uri uri, CancellationToken cancellationToken = default)

Parameters

uri Uri
cancellationToken CancellationToken

Returns

ValueTask

ReceiveAsync(Memory<byte>, CancellationToken)

ValueTask<WebSocketConnectionReceiveResult> ReceiveAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)

Parameters

buffer Memory<byte>
cancellationToken CancellationToken

Returns

ValueTask<WebSocketConnectionReceiveResult>

SendAsync(ReadOnlyMemory<byte>, WebSocketMessageType, WebSocketMessageFlags, CancellationToken)

ValueTask SendAsync(ReadOnlyMemory<byte> buffer, WebSocketMessageType messageType, WebSocketMessageFlags messageFlags, CancellationToken cancellationToken = default)

Parameters

buffer ReadOnlyMemory<byte>
messageType WebSocketMessageType
messageFlags WebSocketMessageFlags
cancellationToken CancellationToken

Returns

ValueTask