WebSocketException Constructors

Definition

Creates an instance of the WebSocketException class.

Overloads

WebSocketException()

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException();

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(WebSocketError, Int32, String, Exception)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, string? message, Exception? innerException);
C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, string message, Exception innerException);

Parameters

error
WebSocketError

The error from the WebSocketError enumeration.

nativeError
Int32

The native error code for the exception.

message
String

The description of the error.

innerException
Exception

Indicates the previous exception that led to the current exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(WebSocketError, String, Exception)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, string? message, Exception? innerException);
C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, string message, Exception innerException);

Parameters

error
WebSocketError

The error from the WebSocketError enumeration.

message
String

The description of the error.

innerException
Exception

Indicates the previous exception that led to the current exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(WebSocketError, Int32, String)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, string? message);
C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, string message);

Parameters

error
WebSocketError

The error from the WebSocketError enumeration.

nativeError
Int32

The native error code for the exception.

message
String

The description of the error.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(WebSocketError, Int32, Exception)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, Exception? innerException);
C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, Exception innerException);

Parameters

error
WebSocketError

The error from the WebSocketError enumeration.

nativeError
Int32

The native error code for the exception.

innerException
Exception

Indicates the previous exception that led to the current exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(String, Exception)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(string? message, Exception? innerException);
C#
public WebSocketException(string message, Exception innerException);

Parameters

message
String

The description of the error.

innerException
Exception

Indicates the previous exception that led to the current exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(WebSocketError, Int32)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError);

Parameters

error
WebSocketError

The error from the WebSocketError enumeration.

nativeError
Int32

The native error code for the exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(WebSocketError, String)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, string? message);
C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, string message);

Parameters

error
WebSocketError

The error from the WebSocketError enumeration.

message
String

The description of the error.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(Int32, String)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(int nativeError, string? message);
C#
public WebSocketException(int nativeError, string message);

Parameters

nativeError
Int32

The native error code for the exception.

message
String

The description of the error.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(Int32, Exception)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(int nativeError, Exception? innerException);
C#
public WebSocketException(int nativeError, Exception innerException);

Parameters

nativeError
Int32

The native error code for the exception.

innerException
Exception

Indicates the previous exception that led to the current exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(String)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(string? message);
C#
public WebSocketException(string message);

Parameters

message
String

The description of the error.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(WebSocketError)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(System.Net.WebSockets.WebSocketError error);

Parameters

error
WebSocketError

The error from the WebSocketError enumeration.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(Int32)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(int nativeError);

Parameters

nativeError
Int32

The native error code for the exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WebSocketException(WebSocketError, Exception)

Source:
WebSocketException.cs
Source:
WebSocketException.cs
Source:
WebSocketException.cs

Creates an instance of the WebSocketException class.

C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, Exception? innerException);
C#
public WebSocketException(System.Net.WebSockets.WebSocketError error, Exception innerException);

Parameters

error
WebSocketError

The error from the WebSocketError enumeration.

innerException
Exception

Indicates the previous exception that led to the current exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1