TsgcWebSocketClientProperties › LogFile

LogFile Property

Persists inbound and outbound socket traffic to a file, useful for debugging the wire protocol.

Syntax

public TsgcWSLogFile LogFile { get; set; }

Default Value

Enabled=False, UnMaskFrames=True, Raw=False

Remarks

Set Enabled=True and FileName to the full path of the output log. Every message sent or received is appended to the file. UnMaskFrames (default True) strips the WebSocket client-to-server masking so the frames are human readable; Raw stores the bytes in hexadecimal instead. Access to the log file is not thread-safe, do not share the same file between several threads.

Example


oClient = new TsgcWebSocketClient();
oClient.URL = "wss://www.esegece.com:2053";
oClient.LogFile.FileName = @"C:\Logs\client.log";
oClient.LogFile.Enabled = true;
oClient.Active = true;

Back to Properties