Websockets 会允许服务器在浏览器中运行吗? [英] Will Websockets allow a server to run in the browser?
问题描述
是否有关于 Websockets 监听功能的计划?
Are there any plans for a Websockets listen function?
在浏览器中允许点对点应用程序可能是革命性的.
Allowing peer to peer applications in the browser could be revolutionary.
我找到了这个答案:HTML5 是否允许网络应用建立点对点 HTTP 连接?但它已经很老了.我认为它所指的规范(Connection api)现在已经被 Websockets 所取代,它没有提到任何监听设施.
I found this answer: Will HTML5 allow web apps to make peer-to-peer HTTP connections? but it is rather old. I think the specification it refers to (the Connection api) has now been replaced with Websockets, which does not mention any listen facility.
推荐答案
WebSockets API 没有提供监听连接的方法;它只是客户端.
The WebSockets API does not provide a way to listen for connections; it is client only.
您可能对 Opera Unite 感兴趣一>.
更新:
另请查看 pusherapp.这是一个在线的 WebSockets 服务.他们对超过 5 个客户收费,但设置和使用非常简单.根据您的 p2p 应用程序要求,它可能就足够了.
Also check out pusherapp. It's a WebSockets service online. They charge for over 5 clients, but it's super simple to setup and use. Depending on what your p2p application requirements are, it might suffice.
这篇关于Websockets 会允许服务器在浏览器中运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!