Skip to main content
Http2Session.settings - node__http2.d.ts - Node documentation
method Http2Session.settings

Usage in Deno

```typescript import { type Http2Session } from "node:node__http2.d.ts"; ```
Http2Session.settings(
settings: Settings,
callback?: (
err: Error | null,
settings: Settings,
duration: number,
) => void
,
): void
Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new settings. The new settings will not become effective until the `SETTINGS` acknowledgment is received and the `'localSettings'` event is emitted. It is possible to send multiple `SETTINGS` frames while acknowledgment is still pending.

Parameters

settings: Settings
optional
callback: (
err: Error | null,
settings: Settings,
duration: number,
) => void
Callback that is called once the session is connected or right away if the session is already connected.

Return Type

void