TsgcHTTP3Client › Properties › WebTransportSessions

WebTransportSessions Property

Collection of WebTransport sessions currently established on this client.

Syntax

property WebTransportSessions: TsgcWebTransportSessions

  read GetWebTransportSessions;

Type

TsgcWebTransportSessions

Default

An empty collection.

Remarks

This property is read-only. The collection itself cannot be replaced, but the sessions it holds can be used. A session is added by every successful WebTransportConnect call and removed when it closes.

Each entry is a TsgcWebTransportSession identified by the QUIC stream ID of the CONNECT request that created it. Use the collection to enumerate active sessions, for example to close them all on shutdown.

Peer-opened streams reach these sessions only while WebTransportProcessEvents is being called.

Sessions support streams only, because datagrams require the RFC 9221 QUIC DATAGRAM extension that the OpenSSL builtin QUIC engine does not provide. WebTransport support is compiled in only when the SGC_WEBTRANSPORT conditional define is enabled.

Example



oSession := oClient.WebTransportConnect('https://www.example.com/wt');

ShowMessage(IntToStr(oClient.WebTransportSessions.Count));

Back to Properties