TsgcHTTP2ClientProperties › NotifyEvents

NotifyEvents 属性

控制 HTTP/2 事件如何调度到主线程。

语法

property NotifyEvents: TwsNotifyEvent read FNotifyEvents write SetNotifyEvents;

默认值

neAsynchronous

备注

有三种模式可用:neAsynchronous(默认)、neSynchronousneNoSync。neNoSync 直接在连接线程上触发事件,速度更快,但要求事件处理程序代码是线程安全的。

示例


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

返回属性