Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CloseWithReceiveErrorAndThrowAsync()

async ValueTask System.Net.WebSockets.ManagedWebSocket.CloseWithReceiveErrorAndThrowAsync ( WebSocketCloseStatus closeStatus,
WebSocketError error,
string errorMessage = null,
Exception innerException = null )
inlineprivate

Definition at line 1159 of file ManagedWebSocket.cs.

1160 {
1161 if (!_sentCloseFrame)
1162 {
1163 await CloseOutputAsync(closeStatus, string.Empty, default(CancellationToken)).ConfigureAwait(continueOnCapturedContext: false);
1164 }
1166 throw (errorMessage != null) ? new WebSocketException(error, errorMessage, innerException) : new WebSocketException(error, innerException);
1167 }
override Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226

References System.Net.WebSockets.ManagedWebSocket._receiveBufferCount, System.Net.WebSockets.ManagedWebSocket._sentCloseFrame, System.Net.WebSockets.ManagedWebSocket.CloseOutputAsync(), and System.Threading.Tasks.Task< TResult >.ConfigureAwait().

Referenced by System.Net.WebSockets.ManagedWebSocket.HandleReceivedCloseAsync(), and System.Net.WebSockets.ManagedWebSocket._003CReceiveAsyncPrivate_003Ed__63< TResult >.MoveNext().