TsgcWebSocketLoadBalancerServerProperties › FallBack

FallBack Property

Provides alternative transports on the load balancer for browsers that do not support native WebSockets.

Syntax

property FallBack: TsgcWSFallBack_Options read FFallBack write SetFallBack;

Default Value

Flash=False, ServerSentEvents.Enabled=False

Remarks

Enable Flash to allow browsers without a native WebSocket implementation but with Flash enabled to use Flash as a transport when connecting to the load balancer. Enable ServerSentEvents.Enabled to let the load balancer push events to browser clients using the HTML5 SSE specification; the Retry sub-property sets the interval in seconds before the browser tries to reconnect (3 by default). Fall-backs are negotiated transparently on the first request, so the same OnMessage/OnConnect events fire regardless of the transport finally used.

Example


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

Back to Properties