简体   繁体   English

node.js-区别websocket.io socket.io

[英]node.js - difference websocket.io socket.io

What are the differences between node.js: node.js有什么区别:

websocket.io and socket.io websocket.io和socket.io

which one is better for what? 哪个更好?

https://github.com/LearnBoost/websocket.io

http://socket.io/

Websocket.io uses parts of the same engine socket.io uses. Websocket.io使用与socket.io使用的引擎相同的部分。 Socket.io has fallbacks so it doesn't just use websockets for sending information to the different browsers. Socket.io具有后备功能,因此它不仅使用websocket将信息发送到不同的浏览器。 This means greater compatibility with a greater number of users. 这意味着与更多用户的更高兼容性。

Both projects are maintained by the same group/person, but websocket.io has not been actively developed for about 9 months, plus there have been 4 releases of node.js since the last release. 这两个项目是由同一个团队/人员维护的,但是websocket.io大约9个月没有被积极开发,而且自上一个发行版以来,已经有4个发行版的node.js。 Socket.io however is being actively maintained and I would recommend using socket.io over the other. 但是正在积极维护Socket.io,因此我建议使用socket.io。

The underlying technology of them both are the same - they both use something called engine.io (again, same guy). 它们的底层技术是相同的-它们都使用称为engine.io的东西(再次是同一个人)。 Websocket.io is just a cut down version and it should still work. Websocket.io只是一个简化版本,它仍然可以正常工作。 If you want something extremely light without fallback support then go for that, but if you want something actively maintained then socket.io is your best bet. 如果您希望某些东西轻巧而没有后备支持,那么可以这样做,但是如果您想要某个东西得到积极维护,那么socket.io是您的最佳选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM