WebTransportException Class

The exception that WebTransport sessions and streams throw.

public sealed class WebTransportException : IOException
Inheritance
IOException WebTransportException

Constructors

NameDescription
WebTransportException()Initializes a new instance of the WebTransportException class.
WebTransportException(WebTransportError, string, Exception?)Initializes a new instance of the WebTransportException class.
WebTransportException(string)Initializes a new instance of the WebTransportException class.
WebTransportException(string, Exception?)Initializes a new instance of the WebTransportException class.

WebTransportException overloads

WebTransportException()

WebTransportException.cs

Initializes a new instance of the WebTransportException class.

public WebTransportException()

WebTransportException(WebTransportError, string, Exception?)

WebTransportException.cs

Initializes a new instance of the WebTransportException class.

public WebTransportException(WebTransportError error, string message, Exception? innerException = null)
Parameters
error WebTransportError
message string
innerException Exception?

WebTransportException(string)

WebTransportException.cs

Initializes a new instance of the WebTransportException class.

public WebTransportException(string message)
Parameters
message string

WebTransportException(string, Exception?)

WebTransportException.cs

Initializes a new instance of the WebTransportException class.

public WebTransportException(string message, Exception? innerException)
Parameters
message string
innerException Exception?

Properties

NameDescription
ErrorGets the kind of error.
StatusCodeGets the HTTP status code of a rejected session.
StreamErrorCodeGets the application error code (0 to 2^32-1) of a stream the peer aborted. It is null when the peer used an HTTP/3 error code that does not map to a WebTransport code.

Gets the kind of error.

public WebTransportError Error { get; }

Property value

WebTransportError

Gets the HTTP status code of a rejected session.

public int? StatusCode { get; init; }

Property value

int?

Gets the application error code (0 to 2^32-1) of a stream the peer aborted. It is null when the peer used an HTTP/3 error code that does not map to a WebTransport code.

public uint? StreamErrorCode { get; init; }

Property value

uint?