TsgcHTTPServer › Properties › FallBack

FallBack Property

Inherited from the shared server engine; has no effect on this component because it never performs a WebSocket upgrade (see Remarks).

Syntax

property FallBack: TsgcWSFallBack_Options read FFallBack write SetFallBack;

Default Value

ServerSentEvents.Enabled=False

Remarks

FallBack is inherited unchanged from the shared server engine that also powers TsgcWebSocketHTTPServer, where it configures Server-Sent-Events as an alternative transport for browsers that cannot open a native WebSocket connection. TsgcHTTPServer never performs a WebSocket upgrade, so ServerSentEvents never activates on this component: there is no WebSocket connection to fall back from. The property remains published for interface compatibility with the shared engine; leave it at its default values. If you need HTTP/SSE-style server push without WebSocket, write an OnCommandGet handler that keeps the response stream open and writes text/event-stream content directly.

Example

(shown for completeness; has no observable effect on TsgcHTTPServer)


oServer := TsgcHTTPServer.Create(nil);
oServer.FallBack.ServerSentEvents.Enabled := true;
oServer.FallBack.ServerSentEvents.Retry := 3;
oServer.Active := true;

Back to Properties