TsgcHTTP3Server › Properties › Port

Port Property

UDP port the HTTP/3 server listens on.

Syntax

property Port: Integer;

Type

Integer

Default

80 (inherited from the UDP server base class). In .NET the default is 443. Assign the port explicitly rather than relying on either default.

Remarks

HTTP/3 runs over QUIC, which uses UDP as its transport, so Port is the UDP port the listener binds to. It is not a TCP port: opening the same number for TCP in a firewall does not make HTTP/3 reachable, and an HTTP/1.1 or HTTP/2 server can happily listen on the same number over TCP at the same time.

The inherited default of 80 is the generic socket default and is not meaningful for HTTP/3, so always set Port before starting. HTTP/3 endpoints commonly use 443, which lets the same authority be advertised through the Alt-Svc header of an HTTPS site, and 4433 is a common choice for testing, since binding a port below 1024 needs elevated privileges on most systems.

Port is read when the listener is created, so assign it before Start or before setting Active to True. Changing it on a running server has no effect until the server is stopped and started again.

This property is inherited from TsgcQUICServer.

Example


oServer := TsgcHTTP3Server.Create(nil);
oServer.Port := 443;

Back to Properties