engine.io 和 socket.io 有什么区别? [英] What's the difference between engine.io and socket.io?

查看:38
本文介绍了engine.io 和 socket.io 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果此问题重复,请纠正我.关于 node.js,我使用 socket.io 进行从客户端应用程序到服务器应用程序的实时套接字连接.我刚刚听说engine.io,engine.io 是socket.io 的替代品吗?我在 engine.io 网站上找不到任何有用的信息

Please correct me if this question is a duplicate. Regarding node.js, I'm using socket.io for real-time socket connection from the client application to the server application. I just heard about engine.io, is engine.io a replacement for socket.io? I could not find any useful information on engine.io website

提前致谢

推荐答案

engine.io 是比 socket.io 低级的库.

engine.io is a lower level library than socket.io.

Engine 之于 Socket.IO 就像 Connect 之于 Express.

Engine is to Socket.IO what Connect is to Express.

如果您想要较低级别的抽象,请使用 engine.io.如果你想要一个 websocket 抽象,继续使用 socket.io.

If you want the lower level abstraction, use engine.io. If you want a websocket abstraction, keep using socket.io.

如果您在 socket.io 之上构建库/框架,那么您对 ​​engine.io 更感兴趣.

engine.io is of more interest to you if you're building a library/framework on top of socket.io.

如果您在 socket.io 之上构建应用程序,那么您对 ​​socket.io 更感兴趣.

socket.io is of more interest to you if you're building an application on top of socket.io.

这篇关于engine.io 和 socket.io 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆