By Admin on Wednesday, 24 February 2021
Category: All

WebSocket Masked Messages

​From sgcWebSockets 4.4.8 the Log of websocket messages has been improved. Till now, the messages were saved as was sent/received by socket, this means that when a websocket message was sent by websocket client, this was first masked and then saved to log. As the message was masked, it can't be read easily so the log was useless for the websocket messages sent by client (the same for websocket messages received by server).

Now the websocket frames are saved UnMasked by default (this can be customized accessing to property LogFile.UnMaskFrames). So when client sends a message, it will be saved unmasked and when server receives a websocket message, it will be save unmasked too (in the case of the server, it will be saved masked and unmasked, because server can handle several protocols and when the buffer is read it doesn't knows which is the protocol).

WebSocket Client Masked Messages 

​Before this change, the websocket messages sent were saved masked, and the text cannot be read.

 WebSocket Client UnMasked Messages

​Find below the log, where the messages sent are not masked.

Related Posts