What is WebSocketWebSocket is a protocol based on full-duplex communication on a single TCP connection. It solves the shortcoming of HTTP protocol that is not suitable for real-time communication. Compared with HTTP protocol, WebSocket protocol realizes persistent network communication, can realize long connection between client and server, and can carry out two-way real-time communication. The protocol name is "ws". WebSocket makes data exchange between clients and servers much simpler, allowing the server to actively push data to the client. In the WebSocket API, the browser and the server only need to complete a handshake, and then a persistent connection can be directly established between the two, and two-way data transmission can be carried out. In the WebSocket API, the browser and the server only need to complete a handshake, and then a fast channel is formed between the browser and the server. Data can be directly transmitted between the two. HTTP vs WebSocketFeatures of WebSocket
What is a Socket?Two programs on the network exchange data through a two-way communication connection. One end of this connection is called a Socket, so at least a pair of port numbers are required to establish a network communication connection. The essence of Socket is the encapsulation of TCP/IP protocol stack. It provides an interface for TCP or UDP programming, not another protocol. Through Socket, you can use TCP/IP protocol. |
<<: State management expert: Cookies and Session
>>: From theory to practice: the wide application of MUX VLAN in the network
MicrosoftInternetExplorer402DocumentNotSpecified7....
No two networks are designed and built alike. One...
[[354213]] Building a zero-trust architecture typ...
1. Introduction In the previous thread series art...
DiyVM is a Chinese hosting company founded in 200...
As of the end of April, more than 1.6 million 5G ...
Internet industry application trends and problems...
According to foreign media reports, a few weeks a...
The good times for tech workers will continue int...
In April, RAKsmart offers a hot sale and regular ...
Now there is a new WIFI standard that can increas...
2019 was a transformational year for the telecomm...
Recently, Qualcomm has cooperated with China Mobi...
At this year's National People's Congress...
On November 28, 2019, in order to accelerate the ...