Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientHttp2Stream

Hierarchy

Implements

  • ReadableStream
  • Writable

Index

Constructors

Private constructor

Properties

aborted

aborted: boolean

bufferSize

bufferSize: number

closed

closed: boolean

destroyed

destroyed: boolean

endAfterHeaders

endAfterHeaders: boolean

Set the true if the END_STREAM flag was set in the request or response HEADERS frame received, indicating that no additional data should be received and the readable side of the Http2Stream will be closed.

Optional id

id: number

pending

pending: boolean

readable

readable: boolean

readableHighWaterMark

readableHighWaterMark: number

readableLength

readableLength: number

rstCode

rstCode: number

sentHeaders

sentHeaders: OutgoingHttpHeaders

Optional sentInfoHeaders

sentInfoHeaders: OutgoingHttpHeaders[]

Optional sentTrailers

sentTrailers: OutgoingHttpHeaders

session

session: Http2Session

state

writable

writable: boolean

writableFinished

writableFinished: boolean

writableHighWaterMark

writableHighWaterMark: number

writableLength

writableLength: number

Static defaultMaxListeners

defaultMaxListeners: number

Methods

__@asyncIterator

  • __@asyncIterator(): AsyncIterableIterator<any>
  • Returns AsyncIterableIterator<any>

_destroy

  • _destroy(error: Error | null, callback: function): void
  • Parameters

    • error: Error | null
    • callback: function
        • (error: Error | null): void
        • Parameters

          • error: Error | null

          Returns void

    Returns void

_final

  • _final(callback: function): void
  • Parameters

    • callback: function
        • (error?: Error | null): void
        • Parameters

          • Optional error: Error | null

          Returns void

    Returns void

_read

  • _read(size: number): void
  • Parameters

    • size: number

    Returns void

_write

  • _write(chunk: any, encoding: string, callback: function): void
  • Parameters

    • chunk: any
    • encoding: string
    • callback: function
        • (error?: Error | null): void
        • Parameters

          • Optional error: Error | null

          Returns void

    Returns void

Optional _writev

  • _writev(chunks: Array<object>, callback: function): void
  • Parameters

    • chunks: Array<object>
    • callback: function
        • (error?: Error | null): void
        • Parameters

          • Optional error: Error | null

          Returns void

    Returns void

addListener

  • addListener(event: "continue", listener: function): this
  • addListener(event: "headers", listener: function): this
  • addListener(event: "push", listener: function): this
  • addListener(event: "response", listener: function): this
  • addListener(event: string | symbol, listener: function): this

close

  • close(code?: number, callback?: function): void
  • Parameters

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

    Returns void

cork

  • cork(): void
  • Returns void

destroy

  • destroy(error?: Error): void
  • Parameters

    • Optional error: Error

    Returns void

emit

end

  • end(cb?: function): void
  • end(chunk: any, cb?: function): void
  • end(chunk: any, encoding?: string, cb?: function): void
  • Parameters

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

    Returns void

  • Parameters

    • chunk: any
    • Optional cb: function
        • (): void
        • Returns void

    Returns void

  • Parameters

    • chunk: any
    • Optional encoding: string
    • Optional cb: function
        • (): void
        • Returns void

    Returns void

eventNames

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

getMaxListeners

  • getMaxListeners(): number
  • Returns number

isPaused

  • isPaused(): boolean
  • 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: "continue", listener: function): this
  • on(event: "headers", listener: function): this
  • on(event: "push", listener: function): this
  • on(event: "response", listener: function): this
  • on(event: string | symbol, listener: function): this

once

  • once(event: "continue", listener: function): this
  • once(event: "headers", listener: function): this
  • once(event: "push", listener: function): this
  • once(event: "response", listener: function): this
  • once(event: string | symbol, listener: function): this

pause

  • pause(): this
  • 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: "continue", listener: function): this
  • prependListener(event: "headers", listener: function): this
  • prependListener(event: "push", listener: function): this
  • prependListener(event: "response", listener: function): this
  • prependListener(event: string | symbol, listener: function): this

prependOnceListener

  • prependOnceListener(event: "continue", listener: function): this
  • prependOnceListener(event: "headers", listener: function): this
  • prependOnceListener(event: "push", listener: function): this
  • prependOnceListener(event: "response", listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this

priority

push

  • push(chunk: any, encoding?: string): boolean
  • Parameters

    • chunk: any
    • Optional encoding: string

    Returns boolean

rawListeners

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

    • event: string | symbol

    Returns Function[]

read

  • read(size?: number): any
  • Parameters

    • Optional size: number

    Returns any

removeAllListeners

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

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: "close", listener: function): this
  • removeListener(event: "data", listener: function): this
  • removeListener(event: "end", listener: function): this
  • removeListener(event: "readable", listener: function): this
  • removeListener(event: "error", listener: function): this
  • removeListener(event: string | symbol, listener: function): this
  • Parameters

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

    Returns this

  • Parameters

    • event: "data"
    • listener: function
        • (chunk: any): void
        • Parameters

          • chunk: any

          Returns void

    Returns this

  • Parameters

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

    Returns this

  • Parameters

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

    Returns this

  • Parameters

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

          • err: Error

          Returns void

    Returns this

  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

resume

  • resume(): this
  • Returns this

sendTrailers

setDefaultEncoding

  • setDefaultEncoding(encoding: string): this
  • Parameters

    • encoding: string

    Returns this

setEncoding

  • setEncoding(encoding: string): this
  • Parameters

    • encoding: string

    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

uncork

  • uncork(): void
  • Returns void

unpipe

  • unpipe(destination?: WritableStream): this
  • Parameters

    • Optional destination: WritableStream

    Returns this

unshift

  • unshift(chunk: any, encoding?: BufferEncoding): void
  • Parameters

    • chunk: any
    • Optional encoding: BufferEncoding

    Returns void

wrap

  • wrap(oldStream: ReadableStream): this
  • Parameters

    • oldStream: ReadableStream

    Returns this

write

  • write(chunk: any, encoding?: string, cb?: function): boolean
  • write(chunk: any, cb?: function): boolean
  • Parameters

    • chunk: any
    • Optional encoding: string
    • Optional cb: function
        • (error: Error | null | undefined): void
        • Parameters

          • error: Error | null | undefined

          Returns void

    Returns boolean

  • Parameters

    • chunk: any
    • Optional cb: function
        • (error: Error | null | undefined): void
        • Parameters

          • error: Error | null | undefined

          Returns void

    Returns boolean

Static from

  • from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable
  • A utility method for creating Readable Streams out of iterators.

    Parameters

    • iterable: Iterable<any> | AsyncIterable<any>
    • Optional options: ReadableOptions

    Returns Readable

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