Options
All
  • Public
  • Public/Protected
  • All
Menu

A TCP proxy.

Hierarchy

  • DisposableBase
    • TcpProxy

Implements

  • Disposable

Index

Constructors

constructor

  • Initializes a new instance of that class.

    Parameters

    Returns TcpProxy

Properties

Protected _DISPOSABLES

_DISPOSABLES: Disposable[]

Stores disposable sub objects.

Protected _INTERVALS

_INTERVALS: Timer[]

Stores intervals.

Protected _TIMEOUTS

_TIMEOUTS: Timer[]

Stores timeouts.

Private _server

_server: Server

afterDisposed

afterDisposed: function

The action to invoke AFTER object has been disposed.

Type declaration

    • (): void
    • Returns void

isDisposed

isDisposed: boolean

Gets if object has been disposed or not.

isDisposing

isDisposing: boolean

Gets if the 'dispose()' method is currently executed or not.

isInFinalizeState

isInFinalizeState: boolean

Gets if the object is disposed or currently disposing.

options

Options for the proxy.

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

defaultDisplayName

  • get defaultDisplayName(): string
  • Gets the default display name.

    Returns string

destinationHost

  • get destinationHost(): string
  • Gets the destination host.

    Returns string

destinationPort

  • get destinationPort(): number
  • Gets the destination port.

    Returns number

isRunning

  • get isRunning(): boolean
  • Gets if the proxy is running or not.

    Returns boolean

sourceHost

  • get sourceHost(): string
  • Gets the source host.

    Returns string

sourcePort

  • get sourcePort(): number
  • Gets the source port.

    Returns number

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

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(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

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: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

Protected onDispose

  • onDispose(): void
  • inheritdoc

    Returns void

once

  • once(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): 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

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

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

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
  • inheritdoc

    Returns 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

  • Loads the global list of TCP proxies.

    Parameters

    • extension: ExtensionContext

      The underlying extension (context).

    Returns TcpProxyListItem[]

    The list of items.

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