### Hierarchy

- EventEmitter
  - Discover

## Index

### Constructors

- constructor

### Properties

- bondToAddress
- broadcast
- broadcastHelloCounter
- channels
- checkId
- checkInterval
- dyunicast
- helloId
- helloInterval
- instanceUuid
- masterTimeout
- mastersRequired
- me
- multicast
- multicastHelloCounter
- nodeTimeout
- nodes
- resetId
- resetInterval
- running
- defaultMaxListeners

### Accessors

- id
- isMaster

### Methods

- addListener
- demote
- eachNode
- emit
- eventNames
- getMaxListeners
- hello
- join
- leave
- listenerCount
- listeners
- on
- onHello
- once
- prependListener
- prependOnceListener
- promote
- removeAllListeners
- removeListener
- send
- sendTo
- setAdvertisement
- setMasterEligible
- setMaxListeners
- start
- stop
- listenerCount
- weight

## Constructors

### constructor

- new Discover(options: DiscoverOptions, advertisement?: any): Discover

- - Defined in discover.ts:122

  #### Parameters

  - ##### options: DiscoverOptions

  - ##### Optional advertisement: any

  #### Returns Discover

## Properties

### Private bondToAddress

bondToAddress: boolean

- Defined in discover.ts:110

### Private broadcast

broadcast: BroadcastNetwork

- Defined in discover.ts:118

### Private broadcastHelloCounter

broadcastHelloCounter: number = 0

- Defined in discover.ts:119

### Private channels

channels: Set<string> = new Set<string>()

- Defined in discover.ts:116

### Private checkId

checkId: Timer

- Defined in discover.ts:112

### Private checkInterval

checkInterval: number = 2000

- Defined in discover.ts:103

### Private dyunicast

dyunicast: DynamicUnicastNetwork

- Defined in discover.ts:122

### Private helloId

helloId: Timer

- Defined in discover.ts:113

### Private helloInterval

helloInterval: number = 1000

- Defined in discover.ts:102

### Private instanceUuid

instanceUuid: string = uuid.v4()

- Defined in discover.ts:117

### Private masterTimeout

masterTimeout: number = 2000

- Defined in discover.ts:106

### Private mastersRequired

mastersRequired: number = 1

- Defined in discover.ts:107

### Private me

me: HelloData = new HelloData()

- Defined in discover.ts:109

### Private multicast

multicast: MulticastNetwork

- Defined in discover.ts:120

### Private multicastHelloCounter

multicastHelloCounter: number = 0

- Defined in discover.ts:121

### Private nodeTimeout

nodeTimeout: number = 2000

- Defined in discover.ts:105

### Private nodes

nodes: Map<string, Node> = new Map<string, Node>()

- Defined in discover.ts:115

### Private resetId

resetId: Timer

- Defined in discover.ts:114

### Private resetInterval

resetInterval: number = 60000

- Defined in discover.ts:104

### Private running

running: boolean = false

- Defined in discover.ts:111

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

- Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:780

## Accessors

### id

id:

- Defined in discover.ts:306

### isMaster

isMaster:

- Defined in discover.ts:302

## Methods

### addListener

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

- Inherited from EventEmitter.addListener

  Overrides EventEmitter.addListener

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:782

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### demote

- demote(permanent: boolean): Promise<void>

- - Defined in discover.ts:295

  #### Parameters

  - ##### permanent: boolean

  #### Returns Promise<void>

### eachNode

- eachNode(fn: function): void

- - Defined in discover.ts:329

  #### Parameters

  - ##### fn: function

    - - (node: INode): void

      - #### Parameters

        - ##### node: INode

        #### Returns void

### emit

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

- Inherited from EventEmitter.emit

  Overrides EventEmitter.emit

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:792

  #### Parameters

  - ##### event: string | symbol

  - ##### Rest ...args: any[]

  #### Returns boolean

### eventNames

- eventNames(): Array<string | symbol>

- Inherited from EventEmitter.eventNames

  Overrides EventEmitter.eventNames

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:793

  #### Returns Array<string | symbol>

### getMaxListeners

- getMaxListeners(): number

- Inherited from EventEmitter.getMaxListeners

  Overrides EventEmitter.getMaxListeners

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:790

  #### Returns number

### hello

- hello(): Promise<void>

- - Defined in discover.ts:310

  #### Returns Promise<void>

### join

- join(channel: string, fn?: function): boolean

- - Defined in discover.ts:333

  #### Parameters

  - ##### channel: string

  - ##### Optional fn: function

    - - (data: any[], obj: any, rinfo: RemoteInfo): void

      - #### Parameters

        - ##### data: any[]

        - ##### obj: any

        - ##### rinfo: RemoteInfo

        #### Returns void

  #### Returns boolean

### leave

- leave(channel: string): boolean

- - Defined in discover.ts:363

  #### Parameters

  - ##### channel: string

  #### Returns boolean

### listenerCount

- listenerCount(type: string | symbol): number

- Inherited from EventEmitter.listenerCount

  Overrides EventEmitter.listenerCount

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:794

  #### Parameters

  - ##### type: string | symbol

  #### Returns number

### listeners

- listeners(event: string | symbol): Function[]

- Inherited from EventEmitter.listeners

  Overrides EventEmitter.listeners

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:791

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### on

- on(event: string | symbol, listener: function): this

- Inherited from EventEmitter.on

  Overrides EventEmitter.on

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:783

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### Private onHello

- onHello(data: HelloData, obj: any, rinfo: RemoteInfo, mode: MulticommMode.Broadcast | MulticommMode.Multicast | MulticommMode.Unicast): void

- - Defined in discover.ts:413

  #### Parameters

  - ##### data: HelloData

  - ##### obj: any

  - ##### rinfo: RemoteInfo

  - ##### mode: MulticommMode.Broadcast | MulticommMode.Multicast | MulticommMode.Unicast

  #### Returns void

### once

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

- Inherited from EventEmitter.once

  Overrides EventEmitter.once

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:784

  #### 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

- Inherited from EventEmitter.prependListener

  Overrides EventEmitter.prependListener

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:785

  #### 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

- Inherited from EventEmitter.prependOnceListener

  Overrides EventEmitter.prependOnceListener

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:786

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### promote

- promote(): Promise<void>

- - Defined in discover.ts:288

  #### Returns Promise<void>

### removeAllListeners

- removeAllListeners(event?: string | symbol): this

- Inherited from EventEmitter.removeAllListeners

  Overrides EventEmitter.removeAllListeners

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:788

  #### Parameters

  - ##### Optional event: string | symbol

  #### Returns this

### removeListener

- removeListener(event: string | symbol, listener: function): this

- Inherited from EventEmitter.removeListener

  Overrides EventEmitter.removeListener

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:787

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### send

- send(channel: string, ...obj: any[]): Promise<boolean>

- - Defined in discover.ts:371

  #### Parameters

  - ##### channel: string

  - ##### Rest ...obj: any[]

  #### Returns Promise<boolean>

### sendTo

- sendTo(id: string, maxRetries: number, ...obj: any[]): Promise<boolean>

- - Defined in discover.ts:402

  #### Parameters

  - ##### id: string

  - ##### maxRetries: number

  - ##### Rest ...obj: any[]

  #### Returns Promise<boolean>

### setAdvertisement

- setAdvertisement(advertisement?: any): Promise<void>

- - Defined in discover.ts:278

  #### Parameters

  - ##### Optional advertisement: any

  #### Returns Promise<void>

### setMasterEligible

- setMasterEligible(): Promise<void>

- - Defined in discover.ts:283

  #### Returns Promise<void>

### setMaxListeners

- setMaxListeners(n: number): this

- Inherited from EventEmitter.setMaxListeners

  Overrides EventEmitter.setMaxListeners

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:789

  #### Parameters

  - ##### n: number

  #### Returns this

### start

- start(): Promise<boolean>

- - Defined in discover.ts:179

  #### Returns Promise<boolean>

### stop

- stop(): boolean

- - Defined in discover.ts:262

  #### Returns boolean

### Static listenerCount

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

- Inherited from EventEmitter.listenerCount

  - Defined in C:/Sviluppo/GitHub/fucmen/node_modules/@types/node/index.d.ts:779

  #### Parameters

  - ##### emitter: EventEmitter

  - ##### event: string | symbol

  #### Returns number

### Static Private weight

- weight(): number

- - Defined in discover.ts:175

  #### Returns number

Generated using TypeDoc