116 references to WebSocketCloseStatus
Aspire.Dashboard (1)
Aspire.Dashboard.Tests (1)
Aspire.Hosting.Browsers (1)
Aspire.Hosting.Browsers.Tests (3)
dotnet-svcutil-lib (5)
Microsoft.AspNetCore.Http.Connections (6)
_generated\0\LoggerMessage.g.cs (3)
808private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Net.WebSockets.WebSocketCloseStatus?, string, global::System.Exception?> __ClientClosedCallback =
809global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Net.WebSockets.WebSocketCloseStatus?, string>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(3, "ClientClosed"), "Client closed connection with status code '{Status}' ({Description}). Signaling end-of-input to application.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
816public static partial void ClientClosed(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Net.WebSockets.WebSocketCloseStatus? status, string description)
Microsoft.AspNetCore.Http.Connections.Client (10)
Microsoft.AspNetCore.Owin (7)
Microsoft.AspNetCore.TestHost (6)
netstandard (1)
System (1)
System.Net.HttpListener (6)
System.Net.WebSockets (41)
System\Net\WebSockets\ManagedWebSocket.cs (32)
86private WebSocketCloseStatus? _closeStatus;
289public override WebSocketCloseStatus? CloseStatus => _closeStatus;
387public override Task CloseAsync(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken)
406public override Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken)
414private async Task CloseOutputAsyncCore(WebSocketCloseStatus closeStatus, string? statusDescription, bool enterReceiveMutex, CancellationToken cancellationToken)
850await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError, WebSocketError.Faulted, headerErrorMessage).ConfigureAwait(false);
983await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.InvalidPayloadData, WebSocketError.Faulted, SR.net_Websockets_InvalidTextPayload).ConfigureAwait(false);
1081WebSocketCloseStatus closeStatus = WebSocketCloseStatus.NormalClosure;
1088await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError, WebSocketError.Faulted, SR.net_Websockets_ProtocolViolation).ConfigureAwait(false);
1102closeStatus = (WebSocketCloseStatus)BinaryPrimitives.ReadUInt16BigEndian(_receiveBuffer.Span.Slice(_receiveBufferOffset));
1105await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError, WebSocketError.Faulted, SR.net_Websockets_InvalidCloseStatusCodeReceived).ConfigureAwait(false);
1116await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError, WebSocketError.Faulted, SR.net_Websockets_InvalidCloseDescriptionPayload, exc).ConfigureAwait(false);
1243private static bool IsValidCloseStatus(WebSocketCloseStatus closeStatus)
1251if (closeStatus < (WebSocketCloseStatus)1000 || closeStatus >= (WebSocketCloseStatus)5000)
1256if (closeStatus >= (WebSocketCloseStatus)3000)
1263case WebSocketCloseStatus.EndpointUnavailable:
1264case WebSocketCloseStatus.InternalServerError:
1265case WebSocketCloseStatus.InvalidMessageType:
1266case WebSocketCloseStatus.InvalidPayloadData:
1267case WebSocketCloseStatus.MandatoryExtension:
1268case WebSocketCloseStatus.MessageTooBig:
1269case WebSocketCloseStatus.NormalClosure:
1270case WebSocketCloseStatus.PolicyViolation:
1271case WebSocketCloseStatus.ProtocolError:
1272case (WebSocketCloseStatus)1012: // ServiceRestart
1273case (WebSocketCloseStatus)1013: // TryAgainLater
1274case (WebSocketCloseStatus)1014: // BadGateway
1288WebSocketCloseStatus closeStatus, WebSocketError error, string? errorMessage = null, Exception? innerException = null)
1440private async Task CloseAsyncPrivate(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken)
1544private async ValueTask SendCloseFrameAsync(WebSocketCloseStatus closeStatus, string? closeStatusDescription, CancellationToken cancellationToken)
System.Net.WebSockets.Client (23)
System.ServiceModel.Http (4)