TsgcWebSocketLoadBalancerServer › Events

TsgcWebSocketLoadBalancerServer Events

Events you can handle, grouped by purpose, followed by the full alphabetical list.

Lifecycle

NameDescription
OnConnectFires when a WebSocket connection (client or backend server) is established with the load balancer.
OnDisconnectFires when any WebSocket connection accepted by the load balancer is closed.
OnHandshakeFires after the load balancer validates an incoming WebSocket handshake and before the HTTP response is returned.
OnErrorFires when the load balancer detects an error on one of its accepted connections.
OnExceptionFires when an unhandled Delphi exception is caught by the load balancer while processing a connection.

Data

NameDescription
OnMessageFires when the load balancer receives a text WebSocket frame on one of its own sessions.
OnBinaryFires when the load balancer itself receives a binary WebSocket frame on one of its downstream sessions.
OnFragmentedFires when the load balancer receives a fragmented WebSocket frame on one of its own sessions.
OnRawMessageFires when any WebSocket text frame arrives, before higher-level protocols or the forwarder process it.

Client events

NameDescription
OnClientConnectFires when a downstream client finishes the WebSocket handshake against the load balancer and is paired with a backend server.
OnClientDisconnectFires when a downstream client session is dropped from the load balancer, either because the client left or because the backend terminated.
OnClientMessageFires when a text frame is received from a downstream client before it is forwarded to the selected backend server.
OnClientBinaryFires when a binary frame is received from a downstream client before it is forwarded to the selected backend server.
OnClientFragmentedFires when a fragmented binary frame is received from a downstream client before it is forwarded to the backend server.

Backend events

NameDescription
OnServerConnectFires when a backend WebSocket server connects to the load balancer to register itself.
OnServerDisconnectFires when a backend server disconnects from the load balancer.
OnServerReadyFires when a backend server has finished registering with the load balancer and is ready to accept traffic.
OnBeforeSendServerBindingFires before the load balancer sends a backend server binding (host, port, protocol) to a newly accepted downstream client.

HTTP

NameDescription
OnLoadBalancerHTTPRequestFires for each incoming HTTP request received by the load balancer before it is forwarded to the selected backend server.
OnLoadBalancerHTTPResponseFires after the load balancer receives the HTTP response from the backend and before it is returned to the downstream client.

Security

NameDescription
OnSSLGetHandlerFires before the SSL handler is created so a custom server-side handler instance can be supplied to the load balancer.
OnSSLAfterCreateHandlerFires after the load balancer creates the SSL handler so its properties can be customized before the TLS handshake.

All Events (alphabetical)

NameDescription
OnBeforeSendServerBindingFires before the load balancer sends a backend server binding (host, port, protocol) to a newly accepted downstream client.
OnBinaryFires when the load balancer itself receives a binary WebSocket frame on one of its downstream sessions.
OnClientBinaryFires when a binary frame is received from a downstream client before it is forwarded to the selected backend server.
OnClientConnectFires when a downstream client finishes the WebSocket handshake against the load balancer and is paired with a backend server.
OnClientDisconnectFires when a downstream client session is dropped from the load balancer, either because the client left or because the backend terminated.
OnClientFragmentedFires when a fragmented binary frame is received from a downstream client before it is forwarded to the backend server.
OnClientMessageFires when a text frame is received from a downstream client before it is forwarded to the selected backend server.
OnConnectFires when a WebSocket connection (client or backend server) is established with the load balancer.
OnDisconnectFires when any WebSocket connection accepted by the load balancer is closed.
OnErrorFires when the load balancer detects an error on one of its accepted connections.
OnExceptionFires when an unhandled Delphi exception is caught by the load balancer while processing a connection.
OnFragmentedFires when the load balancer receives a fragmented WebSocket frame on one of its own sessions.
OnHandshakeFires after the load balancer validates an incoming WebSocket handshake and before the HTTP response is returned.
OnLoadBalancerHTTPRequestFires for each incoming HTTP request received by the load balancer before it is forwarded to the selected backend server.
OnLoadBalancerHTTPResponseFires after the load balancer receives the HTTP response from the backend and before it is returned to the downstream client.
OnMessageFires when the load balancer receives a text WebSocket frame on one of its own sessions.
OnRawMessageFires when any WebSocket text frame arrives, before higher-level protocols or the forwarder process it.
OnServerConnectFires when a backend WebSocket server connects to the load balancer to register itself.
OnServerDisconnectFires when a backend server disconnects from the load balancer.
OnServerReadyFires when a backend server has finished registering with the load balancer and is ready to accept traffic.
OnSSLAfterCreateHandlerFires after the load balancer creates the SSL handler so its properties can be customized before the TLS handshake.
OnSSLGetHandlerFires before the SSL handler is created so a custom server-side handler instance can be supplied to the load balancer.