In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
This article is to share with you about the characteristics of websocket, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article. Without saying much, let's take a look at it.
Features:
Less control overhead. After the connection is created, the packet header used for protocol control is relatively small when data is exchanged between the server and the client. Without an extension, the header size is only 2 to 10 bytes for server-to-client content (depending on packet length), and an additional 4-byte mask is required for client-to-server content. This overhead is significantly reduced compared to having to carry a complete header every time a HTTP request is made.
Stronger real-time performance. Because the protocol is full-duplex, the server can actively send data to the client at any time. Compared with the HTTP request, it needs to wait for the client to initiate the request before the server can respond, and the delay is significantly less; even compared with similar long polling such as Comet, it can transmit data more times in a short time.
Stay connected. Unlike HTTP, Websocket needs to create a connection first, which makes it a stateful protocol, and then some state information can be omitted when communicating. HTTP requests may need to carry status information (such as authentication, etc.) in each request.
Better binary support. Websocket defines binary frames, which make it easier to handle binary content than HTTP.
Extensions can be supported. Websocket defines extensions that allow users to extend protocols and implement partially customized subprotocols. Such as some browsers support compression and so on.
Better compression effect. Compared to HTTP compression, Websocket can use the context of previous content with appropriate extension support, and can significantly increase the compression ratio when passing similar data.
These are the characteristics of websocket, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.