TsgcQUICClient › 事件 › OnQUICConnect
客户端成功连接到 QUIC 服务器后立即触发。
property OnQUICConnect: TsgcQUICConnectEvent;
// TsgcQUICConnectEvent = procedure(Sender: TObject; const Connection: TsgcQUICConnectionClient) of object
—
OnQUICConnect 在 UDP 套接字打开、TLS 1.3 握手成功且 QUIC 连接建立后触发,表明客户端已准备好发送数据。Connection 参数公开活动会话,以便应用程序记录连接或初始化每会话上下文。建议在此处通过 WriteData 开始发送数据。
procedure OnQUICConnectEvent(Sender: TObject; const Connection: TsgcQUICConnectionClient);
begin
Log('QUIC connected');
end;