Maintain a long connection, when the server side of the new message, can be pushed to the user in real time. Like Zhihu’s like notification and comm

What can websocket do?

submited by
Style Pass
2021-05-25 06:05:15

Maintain a long connection, when the server side of the new message, can be pushed to the user in real time. Like Zhihu’s like notification and comments, you can use websocket to communicate.

In order to simplify the development, some clients using H5 will also use websocket for message notification. Because it is a real-time push, it will have a better user experience.

Some suboptimal data, such as behavior log, trace and exception stack collection, can be transmitted through a special websocket channel. This can increase the concentration of information, and timely push the appropriate configuration for user behavior. Since most browser cores support it, it will make the client APM programming model simple.

Although you can catch many websocket packages by using fiddler, Charles, etc. But if SSL is turned on at the same time, the transmission of encrypted binary data will greatly increase the cost of cracking, and it will be much safer.

This… Because it is a long duplex connection, the server can push some hook commands, or even code directly, to execute on the client. For example, cut a screen, record a sound, plant a pony. As long as the user has passed the authorization application, the rest is up to you.

Leave a Comment