WebSocket is a protocol on the application layer in OSI model. This protocol is on the same level to HTTP. Unlike the HTTP protocol, the handshake is only at the beginning of the entire WebSocket connection. The connection can last for a long time. It also allows the bidirectional sending data between the server the client.
In the repo, we are going to demo the WebSocket mechanism.
Referecne
- Start the WebSocket server.
python ws_server.py
- Click the webpage
index.html
.