'Websockets and Chrome Dev Tools
I have two queries about Websockets and how they are presented in Chrome Dev Tools. If that helps, I am using SockJS and StompJS on top of it. Spring framework on the backend.
- What do those symbols "o", "a" and "h" represent?
- After being disconnected from WebSocket, I got a message from the server (the last line in the picture attached). I did not expect that. What is it?
Solution 1:[1]
They are from SockJS communication protocol. You can see them in the SockJS client code here: https://github.com/sockjs/sockjs-client/blob/main/lib/main.js#L244
- o: open connection
- h: heartbeat
- a: array of messages
- m: single message
- c: close connection
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andrei |

