TsgcHTTP3Client › Events › OnConnect
Fires after the HTTP/3 connection has been established.
property OnConnect: TNotifyEvent read FOnConnect write FOnConnect;
| Name | Type | Description |
|---|---|---|
Sender | TObject | The TsgcHTTP3Client instance that raised the event. |
OnConnect fires once the QUIC connection is up: the handshake and TLS 1.3 exchange have completed, the h3 ALPN has been negotiated and the client control and QPACK streams have been opened. From this point requests can be sent.
The server SETTINGS frame may not have arrived yet when the event fires, because it travels on the server control stream and is processed separately. Do not assume PeerSettings is populated inside this handler.
The event fires whether the connection was opened explicitly with Connect or implicitly by a verb method that had to connect first.
procedure TfrmMain.OnConnectEvent(Sender: TObject);
begin
Log('connected');
end;