Javascript-is there any good library for websocket in the browser?

Source: Internet
Author: User
To support IE8 and later versions. All the online searches are socket. io, but this can be used with node. js. My server uses php. To support IE8 and later versions. All the online searches are socket. io, but this can be used with node. js.
My server uses php.

Reply content:

To support IE8 and later versions. All the online searches are socket. io, but this can be used with node. js.
My server uses php.

PHP writeWebSocketYou need to process raw data by yourself. the front-end database is essentially a common method of encapsulation,Socket. ioYou can.

WebSocketHTML5 API is an advanced feature built in the browser, which is absolutely not supported by IE8, and client javascript is not as powerful as custom protocols. therefore, the old browser can only continue to use round robin.

With web-socket-js, flash will be used for socket communication in earlier browsers. However, he also has the disadvantage that only text data can be sent, if your data packet format is designed as binary, it is not supported.

We recommend several frameworks swoole and workerman if you insist on using PHP on the server.

See workerman-chat, as if to use web-socket-js

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.