Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ReadStream

Hierarchy

  • ReadStream
    • ReadStream

Index

Properties

Readonly bufferSize

bufferSize: number

Readonly bytesRead

bytesRead: number

Readonly bytesWritten

bytesWritten: number

Readonly connecting

connecting: boolean

Readonly destroyed

destroyed: boolean

isRaw

isRaw: boolean

isTTY

isTTY: boolean

Readonly localAddress

localAddress: string

Readonly localPort

localPort: number

readable

readable: boolean

Readonly readableHighWaterMark

readableHighWaterMark: number

Readonly readableLength

readableLength: number

Readonly readableObjectMode

readableObjectMode: boolean

Optional Readonly remoteAddress

remoteAddress: undefined | string

Optional Readonly remoteFamily

remoteFamily: undefined | string

Optional Readonly remotePort

remotePort: undefined | number

Readonly writable

writable: boolean

Readonly writableCorked

writableCorked: number

Readonly writableEnded

writableEnded: boolean

Readonly writableFinished

writableFinished: boolean

Readonly writableHighWaterMark

writableHighWaterMark: number

Readonly writableLength

writableLength: number

Readonly writableObjectMode

writableObjectMode: boolean

Methods

[Symbol.asyncIterator]

  • [Symbol.asyncIterator](): AsyncIterableIterator<any>
  • Returns AsyncIterableIterator<any>

_destroy

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

    • error: null | Error
    • callback: (error: null | Error) => void
        • (error: null | Error): void
        • Parameters

          • error: null | Error

          Returns void

    Returns void

_final

  • _final(callback: (error?: null | Error) => void): void
  • Parameters

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

          • Optional error: null | Error

          Returns void

    Returns void

_read

  • _read(size: number): void
  • Parameters

    • size: number

    Returns void

_write

  • _write(chunk: any, encoding: string, callback: (error?: null | Error) => void): void
  • Parameters

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

          • Optional error: null | Error

          Returns void

    Returns void

Optional _writev

_writev:

addListener

  • addListener(event: string, listener: (...args: any[]) => void): ReadStream
  • addListener(event: "close", listener: (had_error: boolean) => void): ReadStream
  • addListener(event: "connect", listener: () => void): ReadStream
  • addListener(event: "data", listener: (data: Buffer) => void): ReadStream
  • addListener(event: "drain", listener: () => void): ReadStream
  • addListener(event: "end", listener: () => void): ReadStream
  • addListener(event: "error", listener: (err: Error) => void): ReadStream
  • addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): ReadStream
  • addListener(event: "timeout", listener: () => void): ReadStream
  • events.EventEmitter

    1. close
    2. connect
    3. data
    4. drain
    5. end
    6. error
    7. lookup
    8. timeout

    Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ReadStream

  • Parameters

    • event: "close"
    • listener: (had_error: boolean) => void
        • (had_error: boolean): void
        • Parameters

          • had_error: boolean

          Returns void

    Returns ReadStream

  • Parameters

    • event: "connect"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "data"
    • listener: (data: Buffer) => void
        • (data: Buffer): void
        • Parameters

          • data: Buffer

          Returns void

    Returns ReadStream

  • Parameters

    • event: "drain"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "end"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

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

          • err: Error

          Returns void

    Returns ReadStream

  • Parameters

    • event: "lookup"
    • listener: (err: Error, address: string, family: string | number, host: string) => void
        • (err: Error, address: string, family: string | number, host: string): void
        • Parameters

          • err: Error
          • address: string
          • family: string | number
          • host: string

          Returns void

    Returns ReadStream

  • Parameters

    • event: "timeout"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

address

  • address(): string | AddressInfo
  • Returns string | AddressInfo

connect

  • connect(options: SocketConnectOpts, connectionListener?: () => void): ReadStream
  • connect(port: number, host: string, connectionListener?: () => void): ReadStream
  • connect(port: number, connectionListener?: () => void): ReadStream
  • connect(path: string, connectionListener?: () => void): ReadStream
  • Parameters

    • options: SocketConnectOpts
    • Optional connectionListener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • port: number
    • host: string
    • Optional connectionListener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • port: number
    • Optional connectionListener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • path: string
    • Optional connectionListener: () => void
        • (): void
        • Returns void

    Returns ReadStream

cork

  • cork(): void
  • Returns void

destroy

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

    • Optional error: Error

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • emit(event: "close", had_error: boolean): boolean
  • emit(event: "connect"): boolean
  • emit(event: "data", data: Buffer): boolean
  • emit(event: "drain"): boolean
  • emit(event: "end"): boolean
  • emit(event: "error", err: Error): boolean
  • emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean
  • emit(event: "timeout"): boolean
  • Parameters

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

    Returns boolean

  • Parameters

    • event: "close"
    • had_error: boolean

    Returns boolean

  • Parameters

    • event: "connect"

    Returns boolean

  • Parameters

    • event: "data"
    • data: Buffer

    Returns boolean

  • Parameters

    • event: "drain"

    Returns boolean

  • Parameters

    • event: "end"

    Returns boolean

  • Parameters

    • event: "error"
    • err: Error

    Returns boolean

  • Parameters

    • event: "lookup"
    • err: Error
    • address: string
    • family: string | number
    • host: string

    Returns boolean

  • Parameters

    • event: "timeout"

    Returns boolean

end

  • end(cb?: () => void): void
  • end(buffer: string | Uint8Array, cb?: () => void): void
  • end(str: string | Uint8Array, encoding?: string, cb?: () => void): void
  • Parameters

    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

  • Parameters

    • buffer: string | Uint8Array
    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

  • Parameters

    • str: string | Uint8Array
    • Optional encoding: string
    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (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: (...args: any[]) => void): ReadStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadStream

on

  • on(event: string, listener: (...args: any[]) => void): ReadStream
  • on(event: "close", listener: (had_error: boolean) => void): ReadStream
  • on(event: "connect", listener: () => void): ReadStream
  • on(event: "data", listener: (data: Buffer) => void): ReadStream
  • on(event: "drain", listener: () => void): ReadStream
  • on(event: "end", listener: () => void): ReadStream
  • on(event: "error", listener: (err: Error) => void): ReadStream
  • on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): ReadStream
  • on(event: "timeout", listener: () => void): ReadStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ReadStream

  • Parameters

    • event: "close"
    • listener: (had_error: boolean) => void
        • (had_error: boolean): void
        • Parameters

          • had_error: boolean

          Returns void

    Returns ReadStream

  • Parameters

    • event: "connect"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "data"
    • listener: (data: Buffer) => void
        • (data: Buffer): void
        • Parameters

          • data: Buffer

          Returns void

    Returns ReadStream

  • Parameters

    • event: "drain"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "end"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

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

          • err: Error

          Returns void

    Returns ReadStream

  • Parameters

    • event: "lookup"
    • listener: (err: Error, address: string, family: string | number, host: string) => void
        • (err: Error, address: string, family: string | number, host: string): void
        • Parameters

          • err: Error
          • address: string
          • family: string | number
          • host: string

          Returns void

    Returns ReadStream

  • Parameters

    • event: "timeout"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

once

  • once(event: string, listener: (...args: any[]) => void): ReadStream
  • once(event: "close", listener: (had_error: boolean) => void): ReadStream
  • once(event: "connect", listener: () => void): ReadStream
  • once(event: "data", listener: (data: Buffer) => void): ReadStream
  • once(event: "drain", listener: () => void): ReadStream
  • once(event: "end", listener: () => void): ReadStream
  • once(event: "error", listener: (err: Error) => void): ReadStream
  • once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): ReadStream
  • once(event: "timeout", listener: () => void): ReadStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ReadStream

  • Parameters

    • event: "close"
    • listener: (had_error: boolean) => void
        • (had_error: boolean): void
        • Parameters

          • had_error: boolean

          Returns void

    Returns ReadStream

  • Parameters

    • event: "connect"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "data"
    • listener: (data: Buffer) => void
        • (data: Buffer): void
        • Parameters

          • data: Buffer

          Returns void

    Returns ReadStream

  • Parameters

    • event: "drain"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "end"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

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

          • err: Error

          Returns void

    Returns ReadStream

  • Parameters

    • event: "lookup"
    • listener: (err: Error, address: string, family: string | number, host: string) => void
        • (err: Error, address: string, family: string | number, host: string): void
        • Parameters

          • err: Error
          • address: string
          • family: string | number
          • host: string

          Returns void

    Returns ReadStream

  • Parameters

    • event: "timeout"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

pause

  • Returns ReadStream

pipe

  • pipe<T>(destination: T, options?: { end?: undefined | boolean }): T
  • Type parameters

    Parameters

    • destination: T
    • Optional options: { end?: undefined | boolean }
      • Optional end?: undefined | boolean

    Returns T

prependListener

  • prependListener(event: string, listener: (...args: any[]) => void): ReadStream
  • prependListener(event: "close", listener: (had_error: boolean) => void): ReadStream
  • prependListener(event: "connect", listener: () => void): ReadStream
  • prependListener(event: "data", listener: (data: Buffer) => void): ReadStream
  • prependListener(event: "drain", listener: () => void): ReadStream
  • prependListener(event: "end", listener: () => void): ReadStream
  • prependListener(event: "error", listener: (err: Error) => void): ReadStream
  • prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): ReadStream
  • prependListener(event: "timeout", listener: () => void): ReadStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ReadStream

  • Parameters

    • event: "close"
    • listener: (had_error: boolean) => void
        • (had_error: boolean): void
        • Parameters

          • had_error: boolean

          Returns void

    Returns ReadStream

  • Parameters

    • event: "connect"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "data"
    • listener: (data: Buffer) => void
        • (data: Buffer): void
        • Parameters

          • data: Buffer

          Returns void

    Returns ReadStream

  • Parameters

    • event: "drain"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "end"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

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

          • err: Error

          Returns void

    Returns ReadStream

  • Parameters

    • event: "lookup"
    • listener: (err: Error, address: string, family: string | number, host: string) => void
        • (err: Error, address: string, family: string | number, host: string): void
        • Parameters

          • err: Error
          • address: string
          • family: string | number
          • host: string

          Returns void

    Returns ReadStream

  • Parameters

    • event: "timeout"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

prependOnceListener

  • prependOnceListener(event: string, listener: (...args: any[]) => void): ReadStream
  • prependOnceListener(event: "close", listener: (had_error: boolean) => void): ReadStream
  • prependOnceListener(event: "connect", listener: () => void): ReadStream
  • prependOnceListener(event: "data", listener: (data: Buffer) => void): ReadStream
  • prependOnceListener(event: "drain", listener: () => void): ReadStream
  • prependOnceListener(event: "end", listener: () => void): ReadStream
  • prependOnceListener(event: "error", listener: (err: Error) => void): ReadStream
  • prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): ReadStream
  • prependOnceListener(event: "timeout", listener: () => void): ReadStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ReadStream

  • Parameters

    • event: "close"
    • listener: (had_error: boolean) => void
        • (had_error: boolean): void
        • Parameters

          • had_error: boolean

          Returns void

    Returns ReadStream

  • Parameters

    • event: "connect"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "data"
    • listener: (data: Buffer) => void
        • (data: Buffer): void
        • Parameters

          • data: Buffer

          Returns void

    Returns ReadStream

  • Parameters

    • event: "drain"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "end"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

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

          • err: Error

          Returns void

    Returns ReadStream

  • Parameters

    • event: "lookup"
    • listener: (err: Error, address: string, family: string | number, host: string) => void
        • (err: Error, address: string, family: string | number, host: string): void
        • Parameters

          • err: Error
          • address: string
          • family: string | number
          • host: string

          Returns void

    Returns ReadStream

  • Parameters

    • event: "timeout"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

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

ref

  • Returns ReadStream

removeAllListeners

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

    • Optional event: string | symbol

    Returns ReadStream

removeListener

  • removeListener(event: "close", listener: () => void): ReadStream
  • removeListener(event: "data", listener: (chunk: any) => void): ReadStream
  • removeListener(event: "end", listener: () => void): ReadStream
  • removeListener(event: "readable", listener: () => void): ReadStream
  • removeListener(event: "error", listener: (err: Error) => void): ReadStream
  • removeListener(event: string | symbol, listener: (...args: any[]) => void): ReadStream
  • Parameters

    • event: "close"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

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

          • chunk: any

          Returns void

    Returns ReadStream

  • Parameters

    • event: "end"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

    • event: "readable"
    • listener: () => void
        • (): void
        • Returns void

    Returns ReadStream

  • Parameters

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

          • err: Error

          Returns void

    Returns ReadStream

  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ReadStream

resume

  • Returns ReadStream

setDefaultEncoding

  • setDefaultEncoding(encoding: string): ReadStream
  • Parameters

    • encoding: string

    Returns ReadStream

setEncoding

  • Parameters

    • Optional encoding: string

    Returns ReadStream

setKeepAlive

  • setKeepAlive(enable?: boolean, initialDelay?: number): ReadStream
  • Parameters

    • Optional enable: boolean
    • Optional initialDelay: number

    Returns ReadStream

setMaxListeners

  • Parameters

    • n: number

    Returns ReadStream

setNoDelay

  • Parameters

    • Optional noDelay: boolean

    Returns ReadStream

setRawMode

  • Parameters

    • mode: boolean

    Returns ReadStream

setTimeout

  • setTimeout(timeout: number, callback?: () => void): ReadStream
  • Parameters

    • timeout: number
    • Optional callback: () => void
        • (): void
        • Returns void

    Returns ReadStream

uncork

  • uncork(): void
  • Returns void

unpipe

unref

  • Returns ReadStream

unshift

  • unshift(chunk: any, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"): void
  • Parameters

    • chunk: any
    • Optional encoding: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"

    Returns void

wrap

write

  • write(buffer: string | Uint8Array, cb?: (err?: Error) => void): boolean
  • write(str: string | Uint8Array, encoding?: string, cb?: (err?: Error) => void): boolean
  • Parameters

    • buffer: string | Uint8Array
    • Optional cb: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns boolean

  • Parameters

    • str: string | Uint8Array
    • Optional encoding: string
    • Optional cb: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns boolean

Generated using TypeDoc