Feature notes: HTTPS application layer notes (HTTP/1.1, h2, h3)
Host, Authority, Key: string;
Port: Word;
Host: string;
Port: Word;
Generation: UInt64;
WHERE TsmCustomHTTPSClient REMEMBERS HTTP/3 ALTERNATIVES that servers advertised with Alt-Svc (HTTPSClient.txt, CACHE AND ORIGIN RULES). Each client starts with a private one. To let several clients share what any of them learns, create one with NewHttpAltSvcCache and assign it to their AltSvcCache while they are disconnected - but only between clients with the same trust configuration, since all of them then use its routes. The client makes every call below itself; an application normally only creates, assigns and clears a cache. A custom implementation must be thread-safe and must never call back into a client. Build each origin with TryHttpAltSvcOrigin: Learn and TrySelect ignore a record whose Key and Authority do not match its Host and Port. Take every aNowMS from one monotonic millisecond clock (the client uses stTlsUtils.GetTickCount64).
procedure Learn(const aOrigin: tHttpAltSvcOrigin; const aFieldValue: string; aNowMS, aResponseAgeMS: UInt64);
function TrySelect(const aOrigin: tHttpAltSvcOrigin; aNowMS: UInt64; out aAlternative: tHttpAltSvcAlternative): Boolean;
procedure Failed(const aOrigin: tHttpAltSvcOrigin; const aAlternative: tHttpAltSvcAlternative; aNowMS: UInt64);
procedure Rejected(const aOrigin: tHttpAltSvcOrigin; const aAlternative: tHttpAltSvcAlternative);
procedure ClearOrigin(const aOrigin: tHttpAltSvcOrigin);
procedure Clear;