Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Microsoft.​AspNetCore.​Http.​Features.​IWebTransportSession

Assembly: Microsoft.AspNetCore.Http.Features

Controls the session and streams of a WebTransport session.

Properties

long
SessionId
The id of the WebTransport session.

Methods

void
Abort​(int errorCode)
Abruptly close the WebTransport session and stop all the streams.
errorCode HTTP error code that corresponds to the reason for causing the abort.
Remarks Error codes are described here: https://www.rfc-editor.org/rfc/rfc9114.html#name-http-3-error-codes
AcceptStreamAsync​(System.​Threading.​CancellationToken cancellationToken = null)
Returns the next incoming stream in the order the server received it. The stream can be either bidirectional or unidirectional.
Returns The unidirectional or bidirectional stream that is next in the queue, or <c>null</c> if the session has ended.
cancellationToken The cancellation token used to cancel the operation.
Remarks To use WebTransport, you must first enable the <c>Microsoft.AspNetCore.Server.Kestrel.Experimental.WebTransportAndH3Datagrams</c> AppContextSwitch
OpenUnidirectionalStreamAsync​(System.​Threading.​CancellationToken cancellationToken = null)
Opens a new unidirectional output stream.
Returns The unidirectional stream that was opened.
cancellationToken The cancellation token used to cancel the operation.