A trap based on the socket.io mechanism of node. js that only resolves the problem that the client inherits Socket.io

Source: Internet
Author: User

Socket.io enables real-time bidirectional event-based communication.
It works on every platform, browser or device, focusing equally on reliability and speed.


During the week, Socket.io is indeed a good solution for instant data transmission, because of its good backward compatibility (web Socket Comet xhr) makes it no difference on any platform, and ensure the real-time data;



Recently opened by grabbing data from a Web site (involving projects that were previously self-developed), found that the request for Socket.io was rejected

Since the problem is only recently discovered, it is not possible to determine exactly which version of the Socket.io package is the issue of the redefined protocol package


Earlier versions start link address formats such as http;//120.24.242.171:8080/socket.io/1/?t=1426217855490

The latest version of Socket.io NPM package with its boot address format is as follows http://120.24.242.171:8080/socket.io/?EIO=3&transport=polling&t=1426217855490-0


In fact, the current fuzzy definition of the socket request address its ambiguous address of the protocol is HTTP or HTTPS WS WSS

Because the Socket.io internal definition will determine the type of link to which it belongs.

This article from "I Learn dotnet" blog, declined reprint!

A trap based on the socket.io mechanism of node. js that only resolves the problem that the client inherits Socket.io

Related Article

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.