HTML5 Analysis of actual combat websockets Basic introduction

Source: Internet
Author: User

The HTML5 WebSockets specification defines the API, which agrees that the Web uses a page websockets two-way communication with the remote host protocol.

Introduces the WebSocket interface and defines the full-duplex communication channel through the socket network. HTML5 WebSockets Instead of climbing the polling and long polling solution is used to simulate a full-duplex connection by maintaining two connections.

HTML5 WebSockets account agents and firewalls such as network hazards, so that streaming media can be in whatever connection, and can support upstream and downstream communication in a single connection, HTML5 websockets-based application Server to relieve the burden, Let the existing machine support many other concurrent connections. Shows a major websocket-based structure in which the browser uses a full-duplex websocket connection to communicate directly with the remote host.


  


A program typically uses a long polling base line to defend against firewalls and proxies.

Technology is effective, but not suitable for application sub-500 millisecond latency or high throughput requirements.

Plug-in technology, such as Adobe Flash, also provides some degree of support for sockets, but has been saddled with the problem of proxy and firewall traversal websockets today.

WebSocket detects that there is a proxy server, and that it proactively sets the tunnel through the proxy. A tunnel is established by issuing an HTTP connect statement to the proxy server, which requests the proxy server to open a TCP/IP connection to a specific host and port. Once the tunnel is established, communication can be unblocked through the agent flow. Because HTTP/S works in a similar way, SSL security websockets can take advantage of the same HTTP connection technology.

Note that WebSockets is only just beginning to be supported by modern browsers (Chrome now supports WebSockets local).

However, the implementation of backward compatibility enables today's browsers to take advantage of this emerging technology.

Other parts of the websockets-like HTML5 work, such as local storage and Geolocation-was as part of the original HTML 5 specification, were transferred to a single standard document specification concentrate.

WebSockets it has been submitted to the Internet Project Task Force (IETF) creator, Web Hypertext Application (WHATWG).

The author, the preacher and the enterprise participates in the standardization still to refer to the original function set, contains WebSockets, "HTML5." ”




HTML5 Analysis of actual combat websockets Basic introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.