Node.js http2 设置对象

🌙
手机阅读
本文目录结构

Node.js http2 设置对象

版本历史

版本 变更
v8.9.3 The maxHeaderListSize setting is now strictly enforced.
v8.4.0 新增于: v8.4.0

The http2.getDefaultSettings(), http2.getPackedSettings(), http2.createServer(), http2.createSecureServer(), http2session.settings(), http2session.localSettings, and http2session.remoteSettings APIs either return or receive as input an object that defines configuration settings for an Http2Session object. These objects are ordinary JavaScript objects containing the following properties.

  • headerTableSize < number> Specifies the maximum number of bytes used for header compression. The minimum allowed value is 0. The maximum allowed value is 232-1. Default: 4,096 octets.
  • enablePush < boolean> Specifies true if HTTP/2 Push Streams are to be permitted on the Http2Session instances.
  • initialWindowSize < number> Specifies the senders initial window size for stream-level flow control. The minimum allowed value is 0. The maximum allowed value is 232-1. Default: 65,535 bytes.
  • maxFrameSize < number> Specifies the size of the largest frame payload. The minimum allowed value is 16,384. The maximum allowed value is 224-1. Default: 16,384 bytes.
  • maxConcurrentStreams < number> Specifies the maximum number of concurrent streams permitted on an Http2Session. There is no default value which implies, at least theoretically, 231-1 streams may be open concurrently at any given time in an Http2Session. The minimum value is 0. The maximum allowed value is 231-1.
  • maxHeaderListSize < number> Specifies the maximum size (uncompressed octets) of header list that will be accepted. The minimum allowed value is 0. The maximum allowed value is 232-1. Default: 65535.
  • enableConnectProtocol< boolean> Specifies true if the “Extended Connect Protocol” defined by RFC 8441 is to be enabled. This setting is only meaningful if sent by the server. Once the enableConnectProtocol setting has been enabled for a given Http2Session, it cannot be disabled.

All additional properties on the settings object are ignored.


更多内容请参考:Node.js HTTP2,或者通过 点击对应菜单 进行查看;



AXIHE / 精选资源

浏览全部教程

面试题

学习网站

前端培训
自己甄别

前端书籍

关于朱安邦

我叫 朱安邦,阿西河的站长,在杭州。

以前是一名平面设计师,后来开始接接触前端开发,主要研究前端技术中的JS方向。

业余时间我喜欢分享和交流自己的技术,欢迎大家关注我的 Bilibili

关注我: Github / 知乎

目前重心已经放在研究区块链上面了

我叫朱安邦,阿西河的站长

目前在杭州从事区块链周边的开发工作,机械专业,以前从事平面设计工作。

2014年底脱产在老家自学6个月的前端技术,自学期间几乎从未出过家门,最终找到了满意的前端工作。更多>