http2 - 我可以通过 STDIN/STDOUT 说 HTTP/2 吗?

标签 http2 nghttp2

我可以通过 STDIN/STDOUT 说 HTTP/2 吗?如果是这样,我该怎么做,有什么限制?

最佳答案

严格来说HTTP/2 does by definition require a TCP connection :

An HTTP/2 connection is an application-layer protocol running on top of a TCP connection ([TCP]). The client is the TCP connection initiator.

HTTP/2 uses the same "http" and "https" URI schemes used by HTTP/1.1. HTTP/2 shares the same default port numbers: 80 for "http" URIs and 443 for "https" URIs. As a result, implementations processing requests for target resource URIs like http://example.org/foo or https://example.com/bar are required to first discover whether the upstream server (the immediate peer to which the client wishes to establish a connection) supports HTTP/2


话虽这么说,您可能可以调整协议(protocol)以在任何任意传输(如管道)上使用,但据我所知,目前没有软件可以以这种方式工作。如果确实存在这样的库,我希望在 HTTP/2 库的测试套件中看到它。这是一个网站containing a list of HTTP/2 test applications .其中一个可能具有与您正在寻找的模式相似的模式。
就优点和局限性而言,由于 HTTP/2 并非旨在以这种方式使用,因此我不确定在任何情况下都有多少优势。主要限制是相同的:大多数软件无法使用管道。

关于http2 - 我可以通过 STDIN/STDOUT 说 HTTP/2 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52489697/

相关文章:

c++ - TLS : no application protocol negotiated

google-chrome - 使用服务器推送推送文件后,如何将文件保存在浏览器缓存上?

Node.js HTTP2 服务器错误 : socket hang up

tcp - 二进制文件的快速传输

来自具有提前 SSL 终止的浏览器的 HTTP2

linux - 通过 nghttp2 使用支持 HTTP\2 的 cURL 连接到 Apple 的 APNS

在 nghttp2 示例中看不到 Http-Settings header

http - HTTP/3 如何处理丢包?

node.js - Socket.io 与 NGINX 和 http 2

google-chrome - 我们应该在 HTTP/2 中复用多少并发请求