### Hierarchy

- EventEmitter
  - Network
    - MulticastNetworkInternal
    - BroadcastNetwork
    - DynamicUnicastNetwork

## Index

### Constructors

- constructor

### Properties

- address
- destinations
- dictionary
- instanceUuid
- key
- msgBuffers
- msgWaitingAckBuffers
- port
- reuseAddr
- socket
- defaultMaxListeners

### Methods

- addListener
- bonded
- decode
- emit
- encode
- eventNames
- getMaxListeners
- listenerCount
- listeners
- on
- once
- prepareMessage
- prependListener
- prependOnceListener
- removeAllListeners
- removeListener
- send
- sendToDest
- setMaxListeners
- start
- stop
- listenerCount

## Constructors

### constructor

- new Network(options: NetworkOptions): Network

- - Defined in network.ts:28

  #### Parameters

  - ##### options: NetworkOptions

  #### Returns Network

## Properties

### Private address

address: string

- Defined in network.ts:23

### Protected destinations

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

- Defined in network.ts:22

### Private dictionary

dictionary: any[]

- Defined in network.ts:28

### Private instanceUuid

instanceUuid: string

- Defined in network.ts:27

### Private key

key: string | null

- Defined in network.ts:25

### Private msgBuffers

msgBuffers: Map<string, MsgBuffer> = new Map<string, MsgBuffer>()

- Defined in network.ts:149

### Private msgWaitingAckBuffers

msgWaitingAckBuffers: Map<string, AckBuffers> = new Map<string, AckBuffers>()

- Defined in network.ts:103

### Private port

port: number

- Defined in network.ts:24

### Private reuseAddr

reuseAddr: boolean

- Defined in network.ts:26

### Protected socket

socket: Socket | null = null

- Defined in network.ts:21

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

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

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

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### Protected bonded

- bonded(address: string): void

- - Defined in network.ts:87

  #### Parameters

  - ##### address: string

  #### Returns void

### Private decode

- decode(data: Buffer, rinfo: RemoteInfo): Promise<any>

- - Defined in network.ts:151

  #### Parameters

  - ##### data: Buffer

  - ##### rinfo: RemoteInfo

  #### Returns Promise<any>

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

  #### Parameters

  - ##### event: string | symbol

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

  #### Returns boolean

### Private encode

- encode(data: any): Promise<Buffer>

- - Defined in network.ts:137

  #### Parameters

  - ##### data: any

  #### Returns Promise<Buffer>

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

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

  #### Returns number

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

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

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

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

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

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### Protected prepareMessage

- prepareMessage(event: string, maxRetries: number, requireAck: false | function, ...data: any[]): Promise<[Buffer[], Promise<void>]>

- - Defined in network.ts:105

  #### Parameters

  - ##### event: string

  - ##### maxRetries: number

  - ##### requireAck: false | function

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

  #### Returns Promise<[Buffer[], Promise<void>]>

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

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

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

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

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

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### send

- send(event: string, ...data: any[]): Promise<void>

- - Defined in network.ts:80

  #### Parameters

  - ##### event: string

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

  #### Returns Promise<void>

### Protected sendToDest

- sendToDest(destination: string, messages: Buffer[], port?: number): Promise<void>

- - Defined in network.ts:89

  #### Parameters

  - ##### destination: string

  - ##### messages: Buffer[]

  - ##### Optional port: number

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

  #### Parameters

  - ##### n: number

  #### Returns this

### start

- start(): Promise<void>

- - Defined in network.ts:41

  #### Returns Promise<void>

### stop

- stop(): void

- - Defined in network.ts:75

  #### Returns void

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

  #### Parameters

  - ##### emitter: EventEmitter

  - ##### event: string | symbol

  #### Returns number

Generated using TypeDoc