TsgcWebSocketClientProperties › Extensions

Extensions Property

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

Syntax

public TsgcWSExtensions Extensions { get; set; }

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 = new TsgcWebSocketClient();
oClient.URL = "wss://www.esegece.com:2053";
oClient.Extensions.PerMessage_Deflate.Enabled = true;
oClient.Active = true;

Back to Properties