Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Http2ServerResponse

Hierarchy

  • Stream
    • Http2ServerResponse

Index

Constructors

Private constructor

Properties

connection

connection: Socket | TLSSocket

finished

finished: boolean

headersSent

headersSent: boolean

sendDate

sendDate: boolean

socket

socket: Socket | TLSSocket

statusCode

statusCode: number

statusMessage

statusMessage: ""

stream

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addListener

  • addListener(event: "close", listener: function): this
  • addListener(event: "drain", listener: function): this
  • addListener(event: "error", listener: function): this
  • addListener(event: "finish", listener: function): this
  • addListener(event: "pipe", listener: function): this
  • addListener(event: "unpipe", listener: function): this
  • addListener(event: string | symbol, listener: function): this
  • Parameters

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

    Returns this

  • Parameters

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

    Returns this

  • Parameters

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

          • error: Error

          Returns void

    Returns this

  • Parameters

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

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          Returns void

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          Returns void

    Returns this

  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

addTrailers

  • Parameters

    Returns void

createPushResponse

emit

  • emit(event: "close"): boolean
  • emit(event: "drain"): boolean
  • emit(event: "error", error: Error): boolean
  • emit(event: "finish"): boolean
  • emit(event: "pipe", src: stream.Readable): boolean
  • emit(event: "unpipe", src: stream.Readable): boolean
  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: "close"

    Returns boolean

  • Parameters

    • event: "drain"

    Returns boolean

  • Parameters

    • event: "error"
    • error: Error

    Returns boolean

  • Parameters

    • event: "finish"

    Returns boolean

  • Parameters

    • event: "pipe"
    • src: stream.Readable

    Returns boolean

  • Parameters

    • event: "unpipe"
    • src: stream.Readable

    Returns boolean

  • Parameters

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

    Returns boolean

end

  • end(callback?: function): void
  • end(data: string | Uint8Array, callback?: function): void
  • end(data: string | Uint8Array, encoding: string, callback?: function): void
  • Parameters

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

    Returns void

  • Parameters

    • data: string | Uint8Array
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

  • Parameters

    • data: string | Uint8Array
    • encoding: string
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

eventNames

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

getHeader

  • getHeader(name: string): string
  • Parameters

    • name: string

    Returns string

getHeaderNames

  • getHeaderNames(): string[]
  • Returns string[]

getHeaders

getMaxListeners

  • getMaxListeners(): number
  • Returns number

hasHeader

  • hasHeader(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

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: "drain", listener: function): this
  • on(event: "error", listener: function): this
  • on(event: "finish", listener: function): this
  • on(event: "pipe", listener: function): this
  • on(event: "unpipe", listener: function): this
  • on(event: string | symbol, listener: function): this
  • Parameters

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

    Returns this

  • Parameters

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

    Returns this

  • Parameters

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

          • error: Error

          Returns void

    Returns this

  • Parameters

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

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          Returns void

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          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: "drain", listener: function): this
  • once(event: "error", listener: function): this
  • once(event: "finish", listener: function): this
  • once(event: "pipe", listener: function): this
  • once(event: "unpipe", listener: function): this
  • once(event: string | symbol, listener: function): this
  • Parameters

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

    Returns this

  • Parameters

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

    Returns this

  • Parameters

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

          • error: Error

          Returns void

    Returns this

  • Parameters

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

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          Returns void

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          Returns void

    Returns this

  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

pipe

  • pipe<T>(destination: T, options?: object): T
  • Type parameters

    • T: WritableStream

    Parameters

    • destination: T
    • Optional options: object
      • Optional end?: boolean

    Returns T

prependListener

  • prependListener(event: "close", listener: function): this
  • prependListener(event: "drain", listener: function): this
  • prependListener(event: "error", listener: function): this
  • prependListener(event: "finish", listener: function): this
  • prependListener(event: "pipe", listener: function): this
  • prependListener(event: "unpipe", listener: function): this
  • prependListener(event: string | symbol, listener: function): this
  • Parameters

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

    Returns this

  • Parameters

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

    Returns this

  • Parameters

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

          • error: Error

          Returns void

    Returns this

  • Parameters

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

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          Returns void

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          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: "drain", listener: function): this
  • prependOnceListener(event: "error", listener: function): this
  • prependOnceListener(event: "finish", listener: function): this
  • prependOnceListener(event: "pipe", listener: function): this
  • prependOnceListener(event: "unpipe", listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

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

    Returns this

  • Parameters

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

    Returns this

  • Parameters

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

          • error: Error

          Returns void

    Returns this

  • Parameters

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

    Returns this

  • Parameters

    • event: "pipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          Returns void

    Returns this

  • Parameters

    • event: "unpipe"
    • listener: function
        • (src: stream.Readable): void
        • Parameters

          • src: stream.Readable

          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[]

removeAllListeners

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

    • Optional event: string | symbol

    Returns this

removeHeader

  • removeHeader(name: string): void
  • Parameters

    • name: string

    Returns void

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

setHeader

  • setHeader(name: string, value: number | string | string[]): void
  • Parameters

    • name: string
    • value: number | string | string[]

    Returns void

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

write

  • write(chunk: string | Uint8Array, callback?: function): boolean
  • write(chunk: string | Uint8Array, encoding: string, callback?: function): boolean
  • Parameters

    • chunk: string | Uint8Array
    • Optional callback: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns boolean

  • Parameters

    • chunk: string | Uint8Array
    • encoding: string
    • Optional callback: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns boolean

writeContinue

  • writeContinue(): void
  • Returns void

writeHead

  • Parameters

    Returns this

  • Parameters

    Returns this

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