87 references to WebSocketCloseStatus
dotnet-svcutil-lib (5)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (5)
1311private WebSocketCloseStatus _outputCloseStatus = WebSocketCloseStatus.NormalClosure; 1314public WebSocketCloseStatus? InputCloseStatus { get; internal set; } 1318internal WebSocketCloseStatus OutputCloseStatus 1334public void SetOutputCloseStatus(WebSocketCloseStatus closeStatus, string closeStatusDescription)
Microsoft.AspNetCore.Http.Connections (6)
_generated\0\LoggerMessage.g.cs (3)
760private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Net.WebSockets.WebSocketCloseStatus?, string, global::System.Exception?> __ClientClosedCallback = 761global::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 }); 768public static partial void ClientClosed(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Net.WebSockets.WebSocketCloseStatus? status, string description)
Internal\Transports\WebSocketsServerTransport.cs (2)
281await socket.CloseOutputAsync(error != null ? WebSocketCloseStatus.InternalServerError : WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
Internal\Transports\WebSocketsServerTransport.Log.cs (1)
20public static partial void ClientClosed(ILogger logger, WebSocketCloseStatus? status, string description);
netstandard (1)
netstandard.cs (1)
1313[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebSockets.WebSocketCloseStatus))]
System (1)
src\runtime\src\libraries\shims\System\ref\System.cs (1)
804[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebSockets.WebSocketCloseStatus))]
System.Net.HttpListener (6)
src\runtime\src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (3)
57internal static void ValidateCloseStatus(WebSocketCloseStatus closeStatus, string? statusDescription) 59if (closeStatus == WebSocketCloseStatus.Empty && !string.IsNullOrEmpty(statusDescription)) 63WebSocketCloseStatus.Empty),
System\Net\Managed\WebSockets\HttpWebSocket.Managed.cs (3)
102public override WebSocketCloseStatus? CloseStatus => _inner.CloseStatus; 110WebSocketCloseStatus closeStatus, 116WebSocketCloseStatus closeStatus,
System.Net.WebSockets (41)
src\runtime\src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (3)
57internal static void ValidateCloseStatus(WebSocketCloseStatus closeStatus, string? statusDescription) 59if (closeStatus == WebSocketCloseStatus.Empty && !string.IsNullOrEmpty(statusDescription)) 63WebSocketCloseStatus.Empty),
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) 849await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError, WebSocketError.Faulted, headerErrorMessage).ConfigureAwait(false); 983await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.InvalidPayloadData, WebSocketError.Faulted).ConfigureAwait(false); 1081WebSocketCloseStatus closeStatus = WebSocketCloseStatus.NormalClosure; 1088await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError, WebSocketError.Faulted).ConfigureAwait(false); 1102closeStatus = (WebSocketCloseStatus)BinaryPrimitives.ReadUInt16BigEndian(_receiveBuffer.Span.Slice(_receiveBufferOffset)); 1105await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError, WebSocketError.Faulted).ConfigureAwait(false); 1116await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError, WebSocketError.Faulted, innerException: 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\WebSocket.cs (3)
15public abstract WebSocketCloseStatus? CloseStatus { get; } 21public abstract Task CloseAsync(WebSocketCloseStatus closeStatus, 24public abstract Task CloseOutputAsync(WebSocketCloseStatus closeStatus,
System\Net\WebSockets\WebSocketReceiveResult.cs (2)
18WebSocketCloseStatus? closeStatus, 33public WebSocketCloseStatus? CloseStatus { get; }
System\Net\WebSockets\WebSocketStream.cs (1)
274await WebSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, null, ct).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
System.Net.WebSockets.Client (23)
src\runtime\src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (4)
57internal static void ValidateCloseStatus(WebSocketCloseStatus closeStatus, string? statusDescription) 59if (closeStatus == WebSocketCloseStatus.Empty && !string.IsNullOrEmpty(statusDescription)) 63WebSocketCloseStatus.Empty), 70if (closeStatus != WebSocketCloseStatus.NormalClosure && (closeStatusCode < ValidCloseStatusCodesFrom || closeStatusCode > ValidCloseStatusCodesTo))
System\Net\WebSockets\BrowserWebSockets\BrowserInterop.cs (2)
23public static WebSocketCloseStatus? GetCloseStatus(JSObject? webSocket) 35return (WebSocketCloseStatus)status;
System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs (14)
19private WebSocketCloseStatus? _closeStatus; 83public override WebSocketCloseStatus? CloseStatus 183public override Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken) 193public override Task CloseAsync(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken) 488switch (_closeStatus ?? WebSocketCloseStatus.NormalClosure) 490case WebSocketCloseStatus.NormalClosure: 491case WebSocketCloseStatus.Empty: 493case WebSocketCloseStatus.InvalidMessageType: 494case WebSocketCloseStatus.InvalidPayloadData: 496case WebSocketCloseStatus.EndpointUnavailable: 498case WebSocketCloseStatus.ProtocolError: 500case WebSocketCloseStatus.InternalServerError: 509private async Task CloseAsyncCore(WebSocketCloseStatus closeStatus, string? statusDescription, bool fullClose, CancellationToken cancellationToken) 617private WebSocketCloseStatus? GetCloseStatusLocked()
System\Net\WebSockets\ClientWebSocket.cs (3)
25public override WebSocketCloseStatus? CloseStatus => _innerWebSocket?.WebSocket?.CloseStatus; 156public override Task CloseAsync(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken) => 159public override Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string? statusDescription, CancellationToken cancellationToken) =>
System.ServiceModel.Http (4)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (4)
1285public WebSocketCloseStatus? InputCloseStatus { get; internal set; } 1289internal WebSocketCloseStatus OutputCloseStatus { get; private set; } = WebSocketCloseStatus.NormalClosure; 1299public void SetOutputCloseStatus(WebSocketCloseStatus closeStatus, string closeStatusDescription)