Options
All
  • Public
  • Public/Protected
  • All
Menu

A TCP proxy.

Hierarchy

Index

Constructors

constructor

Properties

Protected Readonly _DISPOSABLES

_DISPOSABLES: Disposable[]

Stores disposable sub objects.

Protected Readonly _INTERVALS

_INTERVALS: Timer[]

Stores intervals.

Protected Readonly _TIMEOUTS

_TIMEOUTS: Timer[]

Stores timeouts.

Private _server

_server: Server

afterDisposed

afterDisposed: () => void

The action to invoke AFTER object has been disposed.

Type declaration

    • (): void
    • Returns void

Readonly options

Static Readonly captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly errorMonitor

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Accessors

defaultDisplayName

  • get defaultDisplayName(): string

destinationHost

  • get destinationHost(): string

destinationPort

  • get destinationPort(): number

isDisposed

  • get isDisposed(): boolean
  • Gets if object has been disposed or not.

    Returns boolean

isDisposing

  • get isDisposing(): boolean
  • Gets if the 'dispose()' method is currently executed or not.

    Returns boolean

isInFinalizeState

  • get isInFinalizeState(): boolean
  • Gets if the object is disposed or currently disposing.

    Returns boolean

isRunning

  • get isRunning(): boolean

sourceHost

  • get sourceHost(): string

sourcePort

  • get sourcePort(): number

Methods

addListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns TcpProxy

Protected cleanupIntervals

  • cleanupIntervals(): void
  • Cleansup all timeouts.

    Returns void

Protected cleanupTimeouts

  • cleanupTimeouts(): void
  • Cleansup all timeouts.

    Returns void

dispose

  • dispose(): void
  • inheritdoc

    Returns void

emit

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

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

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number

listenerCount

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

    • event: 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): TcpProxy
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns TcpProxy

on

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

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

          • Rest ...args: any[]

          Returns void

    Returns TcpProxy

Protected onDispose

  • onDispose(): void

once

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

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

          • Rest ...args: any[]

          Returns void

    Returns TcpProxy

prependListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns TcpProxy

prependOnceListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns TcpProxy

rawListeners

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

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): TcpProxy

removeListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns TcpProxy

setMaxListeners

start

  • start(): Promise<boolean>
  • Starts the proxy.

    Returns Promise<boolean>

    The promise that indicates if operations was successful or not.

stop

  • stop(): Promise<boolean>
  • Stops the proxy.

    Returns Promise<boolean>

    The promise that indicates if operations was successful or not.

toString

  • toString(): string

Static listenerCount

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

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static loadList

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • once(emitter: DOMEventTarget, event: string): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>

Static reloadGlobalList

  • reloadGlobalList(extension: ExtensionContext): void
  • Reloads the global list of TCP proxies.

    Parameters

    • extension: ExtensionContext

      The underlying extension (context).

    Returns void

Static updateGlobalList

  • updateGlobalList(extension: ExtensionContext): Promise<void>
  • Updates the global list of TCP proxies.

    Parameters

    • extension: ExtensionContext

      The underlying extension (context).

    Returns Promise<void>

Generated using TypeDoc