TsgcHTTP2ClientEigenschappen › NotifyEvents

NotifyEvents Eigenschap

Bepaalt hoe HTTP/2-gebeurtenissen naar de hoofdthread worden gestuurd.

Syntaxis

property NotifyEvents: TwsNotifyEvent read FNotifyEvents write SetNotifyEvents;

Standaardwaarde

neAsynchronous

Opmerkingen

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.

Voorbeeld


oHTTP2 := TsgcHTTP2Client.Create(nil);
oHTTP2.Host := 'http2.akamai.com';
oHTTP2.Port := 443;
oHTTP2.TLS := True;
oHTTP2.NotifyEvents := neSynchronous;

Terug naar eigenschappen