TsgcQUICClient › 事件 › OnQUICDisconnect
QUIC 连接关闭时触发。
property OnQUICDisconnect: TsgcQUICDisconnectEvent;
// TsgcQUICDisconnectEvent = procedure(Sender: TObject; const Connection: TsgcQUICConnectionClient; const Code: Integer) of object
—
OnQUICDisconnect 在 QUIC 连接关闭后触发,无论关闭是由应用程序请求、服务器发起还是因传输错误引起。Connection 参数公开已关闭的会话,Code 参数报告 QUIC 连接关闭代码,应用程序可将其记录或用于决定是否重新连接。
procedure OnQUICDisconnectEvent(Sender: TObject; const Connection: TsgcQUICConnectionClient; const Code: Integer);
begin
Log('QUIC disconnected, code ' + IntToStr(Code));
end;