TsgcHTTP2Client › Eigenschappen › NotifyEvents
Bepaalt hoe HTTP/2-gebeurtenissen naar de hoofdthread worden gestuurd.
property NotifyEvents: TwsNotifyEvent read FNotifyEvents write SetNotifyEvents;
neAsynchronous
Drie modi zijn beschikbaar: neAsynchronous (standaard) plaatst HTTP/2-gebeurtenissen in een wachtrij en synchroniseert ze asynchroon met de hoofdthread; neSynchronous blokkeert de verbindingsthread totdat de hoofdthread de gebeurtenis heeft verwerkt; neNoSync activeert gebeurtenissen rechtstreeks op de verbindingsthread, wat sneller is en beter geschikt voor console- of servicetoepassingen maar vereist dat de gebeurtenishandlercode thread-veilig is.
oHTTP2 := TsgcHTTP2Client.Create(nil);
oHTTP2.Host := 'http2.akamai.com';
oHTTP2.Port := 443;
oHTTP2.TLS := True;
oHTTP2.NotifyEvents := neSynchronous;