TsgcHTTP3Client › Methods › ServerSupportsWebTransport
Returns True when the server SETTINGS advertised WebTransport support.
function ServerSupportsWebTransport: Boolean;
True when the peer advertised both Extended CONNECT and at least one WebTransport session, False otherwise. (Boolean)
The result is computed from the SETTINGS frame the server sent on its control stream: it is True when SETTINGS_ENABLE_CONNECT_PROTOCOL is set and SETTINGS_WEBTRANSPORT_MAX_SESSIONS is greater than zero. Both values can be read individually through PeerSettings.
The value is only meaningful once the first peer SETTINGS frame has been processed, which happens shortly after Connect. Test it before calling WebTransportConnect to avoid a handshake that is certain to fail.
In Delphi and C++Builder this member is a function and must be called with parentheses in C++. In the .NET implementation it is a read-only property, and it reports whether a WebTransportConnect call has already succeeded and confirmed support, rather than being computed from the SETTINGS alone.
WebTransport support is compiled in only when the SGC_WEBTRANSPORT conditional define is enabled.
oClient.Connect('www.example.com', 443);
if oClient.ServerSupportsWebTransport then
oSession := oClient.WebTransportConnect('https://www.example.com/wt');