65 references to WebSocketError
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (3)
101
new WebSocketException(
WebSocketError
.ConnectionClosedPrematurely).Message);
158
case
WebSocketError
.UnsupportedVersion:
160
case
WebSocketError
.UnsupportedProtocol:
Microsoft.AspNetCore.Http.Connections (1)
Internal\Transports\WebSocketsServerTransport.cs (1)
173
catch (WebSocketException ex) when (ex.WebSocketErrorCode ==
WebSocketError
.ConnectionClosedPrematurely)
Microsoft.AspNetCore.Http.Connections.Tests (3)
TestWebSocketConnectionFeature.cs (2)
91
_output.TryComplete(new WebSocketException(
WebSocketError
.ConnectionClosedPrematurely));
177
case
WebSocketError
.ConnectionClosedPrematurely:
WebSocketsTests.cs (1)
137
Assert.IsType<
WebSocketError
>(ex);
Microsoft.AspNetCore.WebSockets.Tests (1)
SendReceiveTests.cs (1)
101
Assert.Equal(
WebSocketError
.ConnectionClosedPrematurely, ex.WebSocketErrorCode);
netstandard (1)
netstandard.cs (1)
1315
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebSockets.
WebSocketError
))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
806
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebSockets.
WebSocketError
))]
System.Net.HttpListener (6)
System\Net\WebSockets\HttpWebSocket.cs (6)
41
throw new WebSocketException(
WebSocketError
.UnsupportedProtocol,
73
throw new WebSocketException(
WebSocketError
.UnsupportedProtocol,
108
throw new WebSocketException(
WebSocketError
.NotAWebSocket,
120
throw new WebSocketException(
WebSocketError
.HeaderError,
128
throw new WebSocketException(
WebSocketError
.UnsupportedVersion,
151
throw new WebSocketException(
WebSocketError
.HeaderError,
System.Net.WebSockets (39)
System\Net\WebSockets\ManagedWebSocket.cs (11)
549
new WebSocketException(
WebSocketError
.ConnectionClosedPrematurely, exc));
590
new WebSocketException(
WebSocketError
.ConnectionClosedPrematurely, exc);
630
new WebSocketException(
WebSocketError
.ConnectionClosedPrematurely, exc);
854
await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError,
WebSocketError
.Faulted, headerErrorMessage).ConfigureAwait(false);
988
await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.InvalidPayloadData,
WebSocketError
.Faulted).ConfigureAwait(false);
1038
throw new WebSocketException(
WebSocketError
.ConnectionClosedPrematurely, exc);
1093
await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError,
WebSocketError
.Faulted).ConfigureAwait(false);
1110
await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError,
WebSocketError
.Faulted).ConfigureAwait(false);
1121
await CloseWithReceiveErrorAndThrowAsync(WebSocketCloseStatus.ProtocolError,
WebSocketError
.Faulted, innerException: exc).ConfigureAwait(false);
1275
WebSocketCloseStatus closeStatus,
WebSocketError
error, string? errorMessage = null, Exception? innerException = null)
1620
throw new WebSocketException(
WebSocketError
.ConnectionClosedPrematurely);
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (1)
82
new WebSocketException(
WebSocketError
.Faulted, SR.net_Websockets_KeepAlivePingTimeout));
System\Net\WebSockets\WebSocket.cs (1)
107
throw new WebSocketException(
WebSocketError
.InvalidState, SR.Format(SR.net_WebSockets_InvalidState, state, validStatesText));
System\Net\WebSockets\WebSocketException.cs (25)
15
private readonly
WebSocketError
_webSocketErrorCode;
22
public WebSocketException(
WebSocketError
error)
27
public WebSocketException(
WebSocketError
error, string? message) : base(message ?? SR.net_WebSockets_Generic)
32
public WebSocketException(
WebSocketError
error, Exception? innerException)
37
public WebSocketException(
WebSocketError
error, string? message, Exception? innerException)
46
_webSocketErrorCode = !Succeeded(nativeError) ?
WebSocketError
.NativeError :
WebSocketError
.Success;
53
_webSocketErrorCode = !Succeeded(nativeError) ?
WebSocketError
.NativeError :
WebSocketError
.Success;
60
_webSocketErrorCode = !Succeeded(nativeError) ?
WebSocketError
.NativeError :
WebSocketError
.Success;
64
public WebSocketException(
WebSocketError
error, int nativeError)
69
public WebSocketException(
WebSocketError
error, int nativeError, string? message)
76
public WebSocketException(
WebSocketError
error, int nativeError, Exception? innerException)
81
public WebSocketException(
WebSocketError
error, int nativeError, string? message, Exception? innerException)
121
public
WebSocketError
WebSocketErrorCode
129
private static string GetErrorMessage(
WebSocketError
error) =>
133
WebSocketError
.InvalidMessageType => SR.Format(SR.net_WebSockets_InvalidMessageType_Generic,
136
WebSocketError
.Faulted => SR.net_Websockets_WebSocketBaseFaulted,
137
WebSocketError
.NotAWebSocket => SR.net_WebSockets_NotAWebSocket_Generic,
138
WebSocketError
.UnsupportedVersion => SR.net_WebSockets_UnsupportedWebSocketVersion_Generic,
139
WebSocketError
.UnsupportedProtocol => SR.net_WebSockets_UnsupportedProtocol_Generic,
140
WebSocketError
.HeaderError => SR.net_WebSockets_HeaderError_Generic,
141
WebSocketError
.ConnectionClosedPrematurely => SR.net_WebSockets_ConnectionClosedPrematurely_Generic,
142
WebSocketError
.InvalidState => SR.net_WebSockets_InvalidState_Generic,
System\Net\WebSockets\WebSocketStateHelper.cs (1)
30
throw new WebSocketException(
WebSocketError
.InvalidState, invalidStateMessage, innerException);
System.Net.WebSockets.Client (10)
System\Net\WebSockets\WebSocketHandle.Managed.cs (10)
85
throw new WebSocketException(
WebSocketError
.UnsupportedProtocol);
97
throw new WebSocketException(
WebSocketError
.UnsupportedProtocol);
171
WebSocketError
.UnsupportedProtocol,
222
throw new WebSocketException(
WebSocketError
.Faulted, SR.net_webstatus_ConnectFailure, exc);
347
throw new WebSocketException(
WebSocketError
.HeaderError,
455
throw new WebSocketException(
WebSocketError
.NotAWebSocket, SR.Format(SR.net_WebSockets_ConnectStatusExpected, (int)response.StatusCode, (int)HttpStatusCode.SwitchingProtocols));
469
throw new WebSocketException(
WebSocketError
.NotAWebSocket, SR.Format(SR.net_WebSockets_ConnectStatusExpected, (int)response.StatusCode, (int)HttpStatusCode.OK));
475
throw new WebSocketException(
WebSocketError
.ConnectionClosedPrematurely);
527
throw new WebSocketException(
WebSocketError
.HeaderError, SR.Format(SR.net_WebSockets_InvalidResponseHeader, name, hsv));
530
throw new WebSocketException(
WebSocketError
.Faulted, SR.Format(SR.net_WebSockets_MissingResponseHeader, name));