Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Http2Session

Hierarchy

Index

Constructors

Protected constructor

  • Returns Http2Session

Properties

Optional alpnProtocol

alpnProtocol: string

closed

closed: boolean

connecting

connecting: boolean

destroyed

destroyed: boolean

Optional encrypted

encrypted: boolean

localSettings

localSettings: Settings

Optional originSet

originSet: string[]

pendingSettingsAck

pendingSettingsAck: boolean

remoteSettings

remoteSettings: Settings

socket

socket: Socket | TLSSocket

state

type

type: number

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addListener

  • addListener(event: "close", listener: function): this
  • addListener(event: "error", listener: function): this
  • addListener(event: "frameError", listener: function): this
  • addListener(event: "goaway", listener: function): this
  • addListener(event: "localSettings", listener: function): this
  • addListener(event: "ping", listener: function): this
  • addListener(event: "remoteSettings", listener: function): this
  • addListener(event: "timeout", listener: function): this
  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "frameError"
    • listener: function
        • (frameType: number, errorCode: number, streamID: number): void
        • Parameters

          • frameType: number
          • errorCode: number
          • streamID: number

          Returns void

    Returns this

  • Parameters

    • event: "goaway"
    • listener: function
        • (errorCode: number, lastStreamID: number, opaqueData: Buffer): void
        • Parameters

          • errorCode: number
          • lastStreamID: number
          • opaqueData: Buffer

          Returns void

    Returns this

  • Parameters

    • event: "localSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "ping"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "remoteSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "timeout"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

close

  • close(callback?: function): void
  • Parameters

    • Optional callback: function
        • (): void
        • Returns void

    Returns void

destroy

  • destroy(error?: Error, code?: number): void
  • Parameters

    • Optional error: Error
    • Optional code: number

    Returns void

emit

  • emit(event: "close"): boolean
  • emit(event: "error", err: Error): boolean
  • emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean
  • emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean
  • emit(event: "localSettings", settings: Settings): boolean
  • emit(event: "ping"): boolean
  • emit(event: "remoteSettings", settings: Settings): boolean
  • emit(event: "timeout"): boolean
  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: "close"

    Returns boolean

  • Parameters

    • event: "error"
    • err: Error

    Returns boolean

  • Parameters

    • event: "frameError"
    • frameType: number
    • errorCode: number
    • streamID: number

    Returns boolean

  • Parameters

    • event: "goaway"
    • errorCode: number
    • lastStreamID: number
    • opaqueData: Buffer

    Returns boolean

  • Parameters

    • event: "localSettings"
    • settings: Settings

    Returns boolean

  • Parameters

    • event: "ping"

    Returns boolean

  • Parameters

    • event: "remoteSettings"
    • settings: Settings

    Returns boolean

  • Parameters

    • event: "timeout"

    Returns boolean

  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

goaway

  • goaway(code?: number, lastStreamID?: number, opaqueData?: Buffer | DataView | NodeJS.TypedArray): void
  • Parameters

    • Optional code: number
    • Optional lastStreamID: number
    • Optional opaqueData: Buffer | DataView | NodeJS.TypedArray

    Returns void

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: "close", listener: function): this
  • on(event: "error", listener: function): this
  • on(event: "frameError", listener: function): this
  • on(event: "goaway", listener: function): this
  • on(event: "localSettings", listener: function): this
  • on(event: "ping", listener: function): this
  • on(event: "remoteSettings", listener: function): this
  • on(event: "timeout", listener: function): this
  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "frameError"
    • listener: function
        • (frameType: number, errorCode: number, streamID: number): void
        • Parameters

          • frameType: number
          • errorCode: number
          • streamID: number

          Returns void

    Returns this

  • Parameters

    • event: "goaway"
    • listener: function
        • (errorCode: number, lastStreamID: number, opaqueData: Buffer): void
        • Parameters

          • errorCode: number
          • lastStreamID: number
          • opaqueData: Buffer

          Returns void

    Returns this

  • Parameters

    • event: "localSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "ping"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "remoteSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "timeout"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: "close", listener: function): this
  • once(event: "error", listener: function): this
  • once(event: "frameError", listener: function): this
  • once(event: "goaway", listener: function): this
  • once(event: "localSettings", listener: function): this
  • once(event: "ping", listener: function): this
  • once(event: "remoteSettings", listener: function): this
  • once(event: "timeout", listener: function): this
  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "frameError"
    • listener: function
        • (frameType: number, errorCode: number, streamID: number): void
        • Parameters

          • frameType: number
          • errorCode: number
          • streamID: number

          Returns void

    Returns this

  • Parameters

    • event: "goaway"
    • listener: function
        • (errorCode: number, lastStreamID: number, opaqueData: Buffer): void
        • Parameters

          • errorCode: number
          • lastStreamID: number
          • opaqueData: Buffer

          Returns void

    Returns this

  • Parameters

    • event: "localSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "ping"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "remoteSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "timeout"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

ping

  • ping(callback: function): boolean
  • ping(payload: Buffer | DataView | NodeJS.TypedArray, callback: function): boolean
  • Parameters

    • callback: function
        • (err: Error | null, duration: number, payload: Buffer): void
        • Parameters

          • err: Error | null
          • duration: number
          • payload: Buffer

          Returns void

    Returns boolean

  • Parameters

    • payload: Buffer | DataView | NodeJS.TypedArray
    • callback: function
        • (err: Error | null, duration: number, payload: Buffer): void
        • Parameters

          • err: Error | null
          • duration: number
          • payload: Buffer

          Returns void

    Returns boolean

prependListener

  • prependListener(event: "close", listener: function): this
  • prependListener(event: "error", listener: function): this
  • prependListener(event: "frameError", listener: function): this
  • prependListener(event: "goaway", listener: function): this
  • prependListener(event: "localSettings", listener: function): this
  • prependListener(event: "ping", listener: function): this
  • prependListener(event: "remoteSettings", listener: function): this
  • prependListener(event: "timeout", listener: function): this
  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "frameError"
    • listener: function
        • (frameType: number, errorCode: number, streamID: number): void
        • Parameters

          • frameType: number
          • errorCode: number
          • streamID: number

          Returns void

    Returns this

  • Parameters

    • event: "goaway"
    • listener: function
        • (errorCode: number, lastStreamID: number, opaqueData: Buffer): void
        • Parameters

          • errorCode: number
          • lastStreamID: number
          • opaqueData: Buffer

          Returns void

    Returns this

  • Parameters

    • event: "localSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "ping"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "remoteSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "timeout"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: "close", listener: function): this
  • prependOnceListener(event: "error", listener: function): this
  • prependOnceListener(event: "frameError", listener: function): this
  • prependOnceListener(event: "goaway", listener: function): this
  • prependOnceListener(event: "localSettings", listener: function): this
  • prependOnceListener(event: "ping", listener: function): this
  • prependOnceListener(event: "remoteSettings", listener: function): this
  • prependOnceListener(event: "timeout", listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "error"
    • listener: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns this

  • Parameters

    • event: "frameError"
    • listener: function
        • (frameType: number, errorCode: number, streamID: number): void
        • Parameters

          • frameType: number
          • errorCode: number
          • streamID: number

          Returns void

    Returns this

  • Parameters

    • event: "goaway"
    • listener: function
        • (errorCode: number, lastStreamID: number, opaqueData: Buffer): void
        • Parameters

          • errorCode: number
          • lastStreamID: number
          • opaqueData: Buffer

          Returns void

    Returns this

  • Parameters

    • event: "localSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "ping"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: "remoteSettings"
    • listener: function

    Returns this

  • Parameters

    • event: "timeout"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

ref

  • ref(): void
  • Returns void

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setTimeout

  • setTimeout(msecs: number, callback?: function): void
  • Parameters

    • msecs: number
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

settings

  • Parameters

    Returns void

unref

  • unref(): void
  • Returns void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc