http2session.goaway([code[, lastStreamID[, opaqueData]]])


  • code <number> HTTP/2 错误代码
  • lastStreamID <number> 最后处理的 Http2Stream 的数字 ID
  • opaqueData <Buffer> | <TypedArray> | <DataView> TypedArrayDataView 实例,包含要在 GOAWAY 帧中携带的附加数据。

GOAWAY 帧传输到连接的对等方而不关闭 Http2Session

  • code <number> An HTTP/2 error code
  • lastStreamID <number> The numeric ID of the last processed Http2Stream
  • opaqueData <Buffer> | <TypedArray> | <DataView> A TypedArray or DataView instance containing additional data to be carried within the GOAWAY frame.

Transmits a GOAWAY frame to the connected peer without shutting down the Http2Session.