TsgcQUICServer › Properties › Active

Active Property

Reports and drives the QUIC listener. Setting it is equivalent to calling Start or Stop.

Syntax

property Active: Boolean read GetActive write SetActive;

Default Value

False

Remarks

Active is inherited from the UDP server base class, and TsgcQUICServer overrides both its getter and its setter so that it reports and drives the OpenSSL QUIC listener instead of the inherited Indy UDP server, which this component never uses. It is not published, so it does not appear in the Object Inspector, but it is public and can be used from code:

Start is implemented as Active := True and Stop as Active := False, so the two entry points are interchangeable and always consistent with each other. Both are idempotent: starting an already started server or stopping an already stopped one does nothing.

This member is available in the Delphi/C++Builder implementation only. The .NET implementation tracks the listener state internally and exposes no Active property, so use Start() and Stop() in cross-language code.

Example


oServer := TsgcQUICServer.Create(nil);
oServer.Port := 4433;
oServer.QUICOptions.SSLOptions.CertFile := 'cert.pem';
oServer.QUICOptions.SSLOptions.KeyFile := 'key.pem';
try
  oServer.Start; // same as oServer.Active := True
except
  on E: Exception do
    Log('start failed: ' + E.Message);
end;

// Active reports the real QUIC listener state
if oServer.Active then
  Log('QUIC server listening on UDP port ' + IntToStr(oServer.Port));

// stopping through the property, same as oServer.Stop
oServer.Active := False;

Back to Properties