TsgcWebSocketClientProperties › Extensions

Extensions Property

Enables WebSocket protocol extensions such as per-message deflate compression.

Syntax

property Extensions: TsgcWSExtensions read GetExtensions write SetExtensions;

Default Value

PerMessage_Deflate.Enabled=False

Remarks

When the server supports compression, enabling Extensions.PerMessage_Deflate reduces bandwidth by applying deflate compression to outgoing frames. The extension is negotiated during the handshake; if the server rejects it the connection falls back to uncompressed frames.

Example


oClient := TsgcWebSocketClient.Create(nil);
oClient.URL := 'wss://www.esegece.com:2053';
oClient.Extensions.PerMessage_Deflate.Enabled := true;
oClient.Active := true;

Back to Properties