TsgcHTTP3Client › Events › OnConnect

OnConnect Event

Fires after the HTTP/3 connection has been established.

Syntax

property OnConnect: TNotifyEvent read FOnConnect write FOnConnect;

Parameters

NameTypeDescription
SenderTObjectThe TsgcHTTP3Client instance that raised the event.

Remarks

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.

Example



procedure TfrmMain.OnConnectEvent(Sender: TObject);

begin

  Log('connected');

end;

Back to Events