Options
All
  • Public
  • Public/Protected
  • All
Menu

A Junknet client. It's responsible for finishing some jobs by distributing them among daemons it knows about.

experimental

Hierarchy

Implemented by

Index

Methods

addListener

  • Type parameters

    Parameters

    Returns Client

emit

  • emit<E>(event: E, ...args: Arguments<ClientEvents[E]>): boolean
  • Type parameters

    Parameters

    Returns boolean

eventNames

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

getMaxListeners

  • getMaxListeners(): number
  • Returns number

introduce

  • introduce(host: string, port: number): void
  • Add a new daemon to the swarm. The client may now give jobs to this daemon.

    Parameters

    • host: string

      hostname or IP address of daemon

    • port: number

      port number of daemon on the host

    Returns void

listenerCount

  • listenerCount<E>(event: E): number
  • Type parameters

    Parameters

    • event: E

    Returns number

listeners

  • listeners<E>(event: E): Function[]
  • Type parameters

    Parameters

    • event: E

    Returns Function[]

off

  • Type parameters

    Parameters

    Returns Client

on

  • Type parameters

    Parameters

    Returns Client

once

  • Type parameters

    Parameters

    Returns Client

prependListener

  • Type parameters

    Parameters

    Returns Client

prependOnceListener

  • Type parameters

    Parameters

    Returns Client

quit

  • quit(): void
  • Close all daemons and clean up resources.

    Returns void

rawListeners

  • rawListeners<E>(event: E): Function[]
  • Type parameters

    Parameters

    • event: E

    Returns Function[]

removeAllListeners

  • removeAllListeners<E>(event?: E): Client
  • Type parameters

    Parameters

    • Optional event: E

    Returns Client

removeListener

  • Type parameters

    Parameters

    Returns Client

setMaxListeners

  • setMaxListeners(maxListeners: number): Client
  • Parameters

    • maxListeners: number

    Returns Client

Generated using TypeDoc