Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Socket

Hierarchy

Index

Properties

Optional isTTY

isTTY: undefined | true

readable

readable: boolean

writable

writable: boolean

Methods

[Symbol.asyncIterator]

addListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns this

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

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

    Returns boolean

end

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

    • Optional cb: undefined | (() => void)

    Returns void

  • Parameters

    • data: string | Uint8Array
    • Optional cb: undefined | (() => void)

    Returns void

  • Parameters

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

    Returns void

eventNames

  • eventNames(): Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number

isPaused

  • isPaused(): 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): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

on

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

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

          • Rest ...args: any[]

          Returns void

    Returns this

once

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

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

          • Rest ...args: any[]

          Returns void

    Returns this

pause

  • pause(): this
  • Returns this

pipe

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

    Parameters

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

    Returns T

prependListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

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

read

  • read(size?: undefined | number): string | Buffer
  • Parameters

    • Optional size: undefined | number

    Returns string | Buffer

removeAllListeners

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

    • Optional event: string | symbol

    Returns this

removeListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns this

resume

  • resume(): this
  • Returns this

setEncoding

  • setEncoding(encoding: string): this
  • Parameters

    • encoding: string

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this

unpipe

unshift

wrap

write

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

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

    Returns boolean

  • Parameters

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

    Returns boolean