ClientWebSocket.CloseOutputAsync Metodo

Definizione

Chiude l'output per l'istanza di ClientWebSocket come operazione asincrona.

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

Parametri

closeStatus
WebSocketCloseStatus

Stato di chiusura di WebSocket.

statusDescription
String

Descrizione dello stato di chiusura.

cancellationToken
CancellationToken

Token di annullamento utilizzato per propagare la notifica che l'operazione deve essere annullata.

Restituisce

Oggetto dell'attività che rappresenta l'operazione asincrona.

Eccezioni

Il token di annullamento è stato annullato. Questa eccezione viene archiviata nell'attività restituita.

Commenti

Questa operazione non verrà bloccata. L'oggetto restituito Task verrà completato dopo la chiusura dell'output nell'istanza ClientWebSocket .

Si applica a