当我们不使用浏览器时,为什么需要 Comet 或 HTTP 轮询?

发布于 2024-08-06 16:27:57 字数 163 浏览 0 评论 0原文

如果您可以完全控制线路的两端(客户端和服务器),为什么人们建议使用 Comet 或 HTTP 长轮询?我理解当你只有一个浏览器时,因为它只能通过 HTTP 进行通信。

人们说你需要这样做才能突破防火墙,因为端口 80 将开放。但为什么不直接通过端口 80 进行通信而不使用 HTTP?我缺少什么?

If you have total control of both ends of the wire (client and server), why do people suggest using Comet or HTTP long polling? I understand when you only have a browser as it can only communicate over HTTP.

People say you need to do this to beat firewalls because port 80 will be open. But why not just communicate directly over port 80 without using HTTP? What am I missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩起发的微风 2024-08-13 16:27:57

有时 HTTP 代理将在端口 80 上运行。这将仅允许 HTTP 流量并阻止/丢弃 FTP 或其他 TCP 流量。

更新:代理是客户端和服务器之间的服务器。对于普通用户来说,它似乎几乎是透明的,但仔细检查流量,您可以找到它的证据。有不同类型的代理可以处理不同类型的流量。 HTTP 代理在流量匿名化、企业网络上的 HTTP 访问控制以及通过缓存提高性能方面很受欢迎。

Sometimes an HTTP proxy will be running on port 80. This will only permit HTTP traffic and block/discard FTP or other TCP traffic.

Update: A proxy is a server between a client and server. It can appear to be almost transparent to the casual user, but on closer inspection of traffic you can find evidence of it. There are different types of proxy which can handle different types of traffic. HTTP proxies are popular for anonimization of traffic, control of HTTP access on corporate networks, and to improve performance through caching.

梦萦几度 2024-08-13 16:27:57

这取决于您的组织使用的防火墙或代理的类型。
代理通常对通过它的仅 http 流量非常严格,并且可以轻松阻止任何非真正的 http 流量。这包括查看 http 标头等以确保它们存在且有效。

如果您没有代理,只在组织中购买防火墙,它可能会让您通过端口 80 传递任何内容,但即使这些设备现在也变得越来越智能,并且可以通过检查您的连接数据并验证来更像代理它违反了一套规则。

It depends on the type of firewall or proxy your organization uses.
A proxy will usually be pretty strict about http only traffic through it, and can easily block anything that is not truly http traffic. This includes looking at the http headers etc to make sure they are present and valid.

If you don't have a proxy buy just a firewall at your organization, it may let you pass anything through port 80, but even these devices are becoming more intelligent these days and can act more like a proxy by inspecting your connection data and validate it against a set of rules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文