TsgcHTTP3Server › Events › OnStartup

OnStartup Event

Fires when the HTTP/3 server starts and is ready to accept connections.

Syntax

property OnStartup: TNotifyEvent;
// TNotifyEvent = procedure(Sender: TObject) of object

Default Value

—

Parameters

NameTypeDescription
SenderTObjectThe TsgcHTTP3Server instance that raised the event.

Remarks

Fired from Active := True (directly or through Start) after the QUIC listener socket has been bound on the configured Port (UDP) and the QUIC engine is ready to accept HTTP/3 connections. Use the event to log that the server is alive, refresh a status indicator in the UI, or start any work that depends on the listener being available.

The event reports that the listener is up, not that a client has arrived: the first client is reported by OnH3Connect. It does not fire when activation fails, since a failing Start raises an exception instead.

This event is inherited from TsgcQUICServer.

Example


procedure OnStartupEvent(Sender: TObject);
begin
  Log('HTTP/3 server listening');
end;

Back to Events