ClientWebSocket.CloseOutputAsync Methode

Definition

Schließt die Ausgabe für die ClientWebSocket-Instanz in einem asynchronen Vorgang.

public:
 override System::Threading::Tasks::Task ^ CloseOutputAsync(System::Net::WebSockets::WebSocketCloseStatus closeStatus, System::String ^ statusDescription, System::Threading::CancellationToken cancellationToken);
public override System.Threading.Tasks.Task CloseOutputAsync (System.Net.WebSockets.WebSocketCloseStatus closeStatus, string? statusDescription, System.Threading.CancellationToken cancellationToken);
public override System.Threading.Tasks.Task CloseOutputAsync (System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken);
override this.CloseOutputAsync : System.Net.WebSockets.WebSocketCloseStatus * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function CloseOutputAsync (closeStatus As WebSocketCloseStatus, statusDescription As String, cancellationToken As CancellationToken) As Task

Parameter

closeStatus
WebSocketCloseStatus

Der WebSocket-Schließstatus.

statusDescription
String

Eine Beschreibung des Schließstatus.

cancellationToken
CancellationToken

Ein Abbruchtoken, mit dem die Benachrichtigung verteilt wird, dass dieser Vorgang abgebrochen werden muss.

Gibt zurück

Das Aufgabenobjekt, das den asynchronen Vorgang darstellt.

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Hinweise

Dieser Vorgang wird nicht blockiert. Das zurückgegebene Task Objekt wird abgeschlossen, nachdem die Ausgabe des ClientWebSocket instance geschlossen wurde.

Gilt für: