WebSocket is a computer communication protocol, provides full-duplex communication channels over a single TCP connection.
1, WebSocket is two-way - using the WebSocket client or server can initiate a message.
2, WebSocket full duplex - Client and server communication are independent.
3, a single TCP connection - initial connection using HTTP, and then upgrade to this connecting socket-based connection. Then this single connection for all future communications.
4, Light - compared with http, WebSocket message data exchange is much lighter.