You can decode messages from WebSocket Server by the Hooks.Protocol.decode or window.SocketProtocol.decode
You can take this script and change it, if you want. There you can use Protocol object by the window.SocketProtocol or Hooks.Protocol.
With this object you can use some methods:
.decode
.encode
.Message
.ParseResourceType
And some properties:
.ItemType
.MessageType
.ProtobufRoot
.ResourceType