HTML5 会允许网络应用程序建立点对点 HTTP 连接吗? [英] Will HTML5 allow web apps to make peer-to-peer HTTP connections?

查看:30
本文介绍了HTML5 会允许网络应用程序建立点对点 HTTP 连接吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以创建一个网络应用程序,在中央服务器的帮助下,与同一网络应用程序的其他用户建立直接连接?我在想象一个类似于UDP打孔的过程.

Is it possible to create a web app that, with the help of a central server, could create direct connections with other users of the same web app? I'm imagining a process similar to UDP hole punching.

我已经阅读了 HTML5 中新的 WebSockets API,但在全双工连接开始之前,您似乎必须启动与 WS 兼容服务器的连接.我正在考虑在客户端之间建立直接连接的过程,服务器参与初始握手.

I've read about the new WebSockets API in HTML5, but it appears you must initiate the connection with a WS-compatible server before the fully-duplexed connection can begin. I'm thinking moreso about a process to make direct connections between clients, with a server getting involved only in the initial handshake.

注意:Java 小程序不算在内.我只对标准浏览器技术感兴趣.

NOTE: Java applets don't count. I'm interested only in standard browser technologies.

推荐答案

这里不是智能猜测,而是明智的答案:

Instead of intelligent guesses, here is an informed answer:

HTML 5 计划允许来自 javascript 的点对点连接,但这些连接不会是原始 TCP.

HTML 5 plans to allow peer to peer connections from javascript, but these connections WILL NOT BE RAW TCP.

完整的规范可以在 http://dev.w3.org/html5/websockets/找到

jrh

具体参考点对点连接,请查看以下链接:

with specific reference to peer to peer connections, check out these links:

需要注意的是,这些功能仍在协商中.能够创建本地聊天"网络应用程序会很好:)

Its important to note that the capabilities are still being negotiated. It will be nice to be able to create "local chat" web apps :)

jrh

这篇关于HTML5 会允许网络应用程序建立点对点 HTTP 连接吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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