### Hierarchy

- EventEmitter
  - Fucmen

## Index

### Constructors

- constructor

### Properties

- allNodes
- discover
- defaultMaxListeners

### Accessors

- connections
- id
- isMaster
- nodes

### Methods

- addListener
- demote
- emit
- eventNames
- getMaxListeners
- getNodeFromId
- join
- leave
- listenerCount
- listeners
- on
- onDirectMessage
- once
- prependListener
- prependOnceListener
- promote
- publish
- removeAllListeners
- removeListener
- restart
- sendTo
- setAdvertisement
- setMasterEligible
- setMaxListeners
- listenerCount

## Constructors

### constructor

- new Fucmen(advertisement: any, discoveryOptions: DiscoverOptions): Fucmen

- - Defined in fucmen.ts:18

  #### Parameters

  - ##### advertisement: any

  - ##### discoveryOptions: DiscoverOptions

  #### Returns Fucmen

## Properties

### Private allNodes

allNodes: Map<string, IFucmenNode> = new Map<string, IFucmenNode>()

- Defined in fucmen.ts:16

### Private discover

discover: Discover

- Defined in fucmen.ts:18

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

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

## Accessors

### connections

connections:

- Defined in fucmen.ts:49

### id

id:

- Defined in fucmen.ts:35

### isMaster

isMaster:

- Defined in fucmen.ts:39

### nodes

nodes:

- Defined in fucmen.ts:43

## 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 fucmen.ts:67

  #### Parameters

  - ##### permanent: boolean

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

### Private getNodeFromId

- getNodeFromId(id: string): IFucmenNode

- - Defined in fucmen.ts:108

  #### Parameters

  - ##### id: string

  #### Returns IFucmenNode

### join

- join(channel: string, listener: function, withFrom?: false): boolean
- join(channel: string, listener: function, withFrom: true): boolean

- - Defined in fucmen.ts:75

  #### Parameters

  - ##### channel: string

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  - ##### Optional withFrom: false

  #### Returns boolean

- - Defined in fucmen.ts:76

  #### Parameters

  - ##### channel: string

  - ##### listener: function

    - - (from: IFucmenNode | undefined, ...data: any[]): void

      - #### Parameters

        - ##### from: IFucmenNode | undefined

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

        #### Returns void

  - ##### withFrom: true

  #### Returns boolean

### leave

- leave(channel: string): boolean

- - Defined in fucmen.ts:85

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

### onDirectMessage

- onDirectMessage(listener: function, withFrom?: false): void
- onDirectMessage(listener: function, withFrom: true): void

- - Defined in fucmen.ts:93

  #### Parameters

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  - ##### Optional withFrom: false

  #### Returns void

- - Defined in fucmen.ts:94

  #### Parameters

  - ##### listener: function

    - - (from: IFucmenNode | undefined, ...data: any[]): void

      - #### Parameters

        - ##### from: IFucmenNode | undefined

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

        #### Returns void

  - ##### withFrom: true

  #### 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 fucmen.ts:63

  #### Returns Promise<void>

### publish

- publish(channel: string, ...data: any[]): Promise<boolean>

- - Defined in fucmen.ts:71

  #### Parameters

  - ##### channel: string

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

  #### Returns Promise<boolean>

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

### restart

- restart(): Promise<boolean>

- - Defined in fucmen.ts:103

  #### Returns Promise<boolean>

### sendTo

- sendTo(id: string, reliableMaxRetries: boolean | number, ...data: any[]): Promise<boolean>

- - Defined in fucmen.ts:89

  #### Parameters

  - ##### id: string

  - ##### reliableMaxRetries: boolean | number

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

  #### Returns Promise<boolean>

### setAdvertisement

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

- - Defined in fucmen.ts:55

  #### Parameters

  - ##### Optional advertisement: any

  #### Returns Promise<void>

### setMasterEligible

- setMasterEligible(): Promise<void>

- - Defined in fucmen.ts:59

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

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

Generated using TypeDoc