### Hierarchy

- EventEmitter
  - Socket

## Index

### Properties

- defaultMaxListeners

### Methods

- addListener
- addMembership
- address
- bind
- close
- dropMembership
- emit
- eventNames
- getMaxListeners
- getRecvBufferSize
- getSendBufferSize
- listenerCount
- listeners
- off
- on
- once
- prependListener
- prependOnceListener
- rawListeners
- ref
- removeAllListeners
- removeListener
- send
- setBroadcast
- setMaxListeners
- setMulticastInterface
- setMulticastLoopback
- setMulticastTTL
- setRecvBufferSize
- setSendBufferSize
- setTTL
- unref
- listenerCount

## Properties

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

- Defined in node_modules/@types/node/events.d.ts:8

## Methods

### addListener

- addListener(event: string, listener: function): this
- addListener(event: "close", listener: function): this
- addListener(event: "error", listener: function): this
- addListener(event: "listening", listener: function): this
- addListener(event: "message", listener: function): this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/dgram.d.ts:66

  events.EventEmitter

  1. close
  2. error
  3. listening
  4. message

  #### Parameters

  - ##### event: string

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/dgram.d.ts:67

  #### Parameters

  - ##### event: "close"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/dgram.d.ts:68

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/dgram.d.ts:69

  #### Parameters

  - ##### event: "listening"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/dgram.d.ts:70

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (msg: Buffer, rinfo: RemoteInfo): void

      - #### Parameters

        - ##### msg: Buffer

        - ##### rinfo: RemoteInfo

        #### Returns void

  #### Returns this

### addMembership

- addMembership(multicastAddress: string, multicastInterface?: undefined | string): void

- - Defined in node_modules/@types/node/dgram.d.ts:50

  #### Parameters

  - ##### multicastAddress: string

  - ##### Optional multicastInterface: undefined | string

  #### Returns void

### address

- address(): AddressInfo | string

- - Defined in node_modules/@types/node/dgram.d.ts:44

  #### Returns AddressInfo | string

### bind

- bind(port?: undefined | number, address?: undefined | string, callback?: undefined | function): void
- bind(port?: undefined | number, callback?: undefined | function): void
- bind(callback?: undefined | function): void
- bind(options: BindOptions, callback?: undefined | function): void

- - Defined in node_modules/@types/node/dgram.d.ts:39

  #### Parameters

  - ##### Optional port: undefined | number

  - ##### Optional address: undefined | string

  - ##### Optional callback: undefined | function

  #### Returns void

- - Defined in node_modules/@types/node/dgram.d.ts:40

  #### Parameters

  - ##### Optional port: undefined | number

  - ##### Optional callback: undefined | function

  #### Returns void

- - Defined in node_modules/@types/node/dgram.d.ts:41

  #### Parameters

  - ##### Optional callback: undefined | function

  #### Returns void

- - Defined in node_modules/@types/node/dgram.d.ts:42

  #### Parameters

  - ##### options: BindOptions

  - ##### Optional callback: undefined | function

  #### Returns void

### close

- close(callback?: undefined | function): void

- - Defined in node_modules/@types/node/dgram.d.ts:43

  #### Parameters

  - ##### Optional callback: undefined | function

  #### Returns void

### dropMembership

- dropMembership(multicastAddress: string, multicastInterface?: undefined | string): void

- - Defined in node_modules/@types/node/dgram.d.ts:51

  #### Parameters

  - ##### multicastAddress: string

  - ##### Optional multicastInterface: undefined | string

  #### Returns void

### emit

- emit(event: string | symbol, ...args: any[]): boolean
- emit(event: "close"): boolean
- emit(event: "error", err: Error): boolean
- emit(event: "listening"): boolean
- emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/dgram.d.ts:72

  #### Parameters

  - ##### event: string | symbol

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

  #### Returns boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/dgram.d.ts:73

  #### Parameters

  - ##### event: "close"

  #### Returns boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/dgram.d.ts:74

  #### Parameters

  - ##### event: "error"

  - ##### err: Error

  #### Returns boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/dgram.d.ts:75

  #### Parameters

  - ##### event: "listening"

  #### Returns boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/dgram.d.ts:76

  #### Parameters

  - ##### event: "message"

  - ##### msg: Buffer

  - ##### rinfo: RemoteInfo

  #### Returns boolean

### eventNames

- eventNames(): Array<string | symbol>

- Inherited from EventEmitter.eventNames

  Overrides EventEmitter.eventNames

  - Defined in node_modules/@types/node/events.d.ts:23

  #### Returns Array<string | symbol>

### getMaxListeners

- getMaxListeners(): number

- Inherited from EventEmitter.getMaxListeners

  Overrides EventEmitter.getMaxListeners

  - Defined in node_modules/@types/node/events.d.ts:19

  #### Returns number

### getRecvBufferSize

- getRecvBufferSize(): number

- - Defined in node_modules/@types/node/dgram.d.ts:56

  #### Returns number

### getSendBufferSize

- getSendBufferSize(): number

- - Defined in node_modules/@types/node/dgram.d.ts:57

  #### Returns number

### listenerCount

- listenerCount(type: string | symbol): number

- Inherited from EventEmitter.listenerCount

  Overrides EventEmitter.listenerCount

  - Defined in node_modules/@types/node/events.d.ts:24

  #### Parameters

  - ##### type: string | symbol

  #### Returns number

### listeners

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

- Inherited from EventEmitter.listeners

  Overrides EventEmitter.listeners

  - Defined in node_modules/@types/node/events.d.ts:20

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### off

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

- Inherited from EventEmitter.off

  Overrides EventEmitter.off

  - Defined in node_modules/@types/node/events.d.ts:16

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### on

- on(event: string, listener: function): this
- on(event: "close", listener: function): this
- on(event: "error", listener: function): this
- on(event: "listening", listener: function): this
- on(event: "message", listener: function): this

- Overrides EventEmitter.on

  - Defined in node_modules/@types/node/dgram.d.ts:78

  #### Parameters

  - ##### event: string

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

- Overrides EventEmitter.on

  - Defined in node_modules/@types/node/dgram.d.ts:79

  #### Parameters

  - ##### event: "close"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.on

  - Defined in node_modules/@types/node/dgram.d.ts:80

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.on

  - Defined in node_modules/@types/node/dgram.d.ts:81

  #### Parameters

  - ##### event: "listening"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.on

  - Defined in node_modules/@types/node/dgram.d.ts:82

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (msg: Buffer, rinfo: RemoteInfo): void

      - #### Parameters

        - ##### msg: Buffer

        - ##### rinfo: RemoteInfo

        #### Returns void

  #### Returns this

### once

- once(event: string, listener: function): this
- once(event: "close", listener: function): this
- once(event: "error", listener: function): this
- once(event: "listening", listener: function): this
- once(event: "message", listener: function): this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/dgram.d.ts:84

  #### Parameters

  - ##### event: string

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/dgram.d.ts:85

  #### Parameters

  - ##### event: "close"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/dgram.d.ts:86

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/dgram.d.ts:87

  #### Parameters

  - ##### event: "listening"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/dgram.d.ts:88

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (msg: Buffer, rinfo: RemoteInfo): void

      - #### Parameters

        - ##### msg: Buffer

        - ##### rinfo: RemoteInfo

        #### Returns void

  #### Returns this

### prependListener

- prependListener(event: string, listener: function): this
- prependListener(event: "close", listener: function): this
- prependListener(event: "error", listener: function): this
- prependListener(event: "listening", listener: function): this
- prependListener(event: "message", listener: function): this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/dgram.d.ts:90

  #### Parameters

  - ##### event: string

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/dgram.d.ts:91

  #### Parameters

  - ##### event: "close"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/dgram.d.ts:92

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/dgram.d.ts:93

  #### Parameters

  - ##### event: "listening"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/dgram.d.ts:94

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (msg: Buffer, rinfo: RemoteInfo): void

      - #### Parameters

        - ##### msg: Buffer

        - ##### rinfo: RemoteInfo

        #### Returns void

  #### Returns this

### prependOnceListener

- prependOnceListener(event: string, listener: function): this
- prependOnceListener(event: "close", listener: function): this
- prependOnceListener(event: "error", listener: function): this
- prependOnceListener(event: "listening", listener: function): this
- prependOnceListener(event: "message", listener: function): this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/dgram.d.ts:96

  #### Parameters

  - ##### event: string

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/dgram.d.ts:97

  #### Parameters

  - ##### event: "close"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/dgram.d.ts:98

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/dgram.d.ts:99

  #### Parameters

  - ##### event: "listening"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/dgram.d.ts:100

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (msg: Buffer, rinfo: RemoteInfo): void

      - #### Parameters

        - ##### msg: Buffer

        - ##### rinfo: RemoteInfo

        #### Returns void

  #### Returns this

### rawListeners

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

- Inherited from EventEmitter.rawListeners

  Overrides EventEmitter.rawListeners

  - Defined in node_modules/@types/node/events.d.ts:21

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### ref

- ref(): this

- - Defined in node_modules/@types/node/dgram.d.ts:52

  #### Returns this

### removeAllListeners

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

- Inherited from EventEmitter.removeAllListeners

  Overrides EventEmitter.removeAllListeners

  - Defined in node_modules/@types/node/events.d.ts:17

  #### Parameters

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

  #### Returns this

### removeListener

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

- Inherited from EventEmitter.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/events.d.ts:15

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### send

- send(msg: Buffer | string | Uint8Array | any[], port: number, address?: undefined | string, callback?: undefined | function): void
- send(msg: Buffer | string | Uint8Array, offset: number, length: number, port: number, address?: undefined | string, callback?: undefined | function): void

- - Defined in node_modules/@types/node/dgram.d.ts:37

  #### Parameters

  - ##### msg: Buffer | string | Uint8Array | any[]

  - ##### port: number

  - ##### Optional address: undefined | string

  - ##### Optional callback: undefined | function

  #### Returns void

- - Defined in node_modules/@types/node/dgram.d.ts:38

  #### Parameters

  - ##### msg: Buffer | string | Uint8Array

  - ##### offset: number

  - ##### length: number

  - ##### port: number

  - ##### Optional address: undefined | string

  - ##### Optional callback: undefined | function

  #### Returns void

### setBroadcast

- setBroadcast(flag: boolean): void

- - Defined in node_modules/@types/node/dgram.d.ts:45

  #### Parameters

  - ##### flag: boolean

  #### Returns void

### setMaxListeners

- setMaxListeners(n: number): this

- Inherited from EventEmitter.setMaxListeners

  Overrides EventEmitter.setMaxListeners

  - Defined in node_modules/@types/node/events.d.ts:18

  #### Parameters

  - ##### n: number

  #### Returns this

### setMulticastInterface

- setMulticastInterface(multicastInterface: string): void

- - Defined in node_modules/@types/node/dgram.d.ts:48

  #### Parameters

  - ##### multicastInterface: string

  #### Returns void

### setMulticastLoopback

- setMulticastLoopback(flag: boolean): void

- - Defined in node_modules/@types/node/dgram.d.ts:49

  #### Parameters

  - ##### flag: boolean

  #### Returns void

### setMulticastTTL

- setMulticastTTL(ttl: number): void

- - Defined in node_modules/@types/node/dgram.d.ts:47

  #### Parameters

  - ##### ttl: number

  #### Returns void

### setRecvBufferSize

- setRecvBufferSize(size: number): void

- - Defined in node_modules/@types/node/dgram.d.ts:54

  #### Parameters

  - ##### size: number

  #### Returns void

### setSendBufferSize

- setSendBufferSize(size: number): void

- - Defined in node_modules/@types/node/dgram.d.ts:55

  #### Parameters

  - ##### size: number

  #### Returns void

### setTTL

- setTTL(ttl: number): void

- - Defined in node_modules/@types/node/dgram.d.ts:46

  #### Parameters

  - ##### ttl: number

  #### Returns void

### unref

- unref(): this

- - Defined in node_modules/@types/node/dgram.d.ts:53

  #### Returns this

### Static listenerCount

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

- Inherited from EventEmitter.listenerCount

  - Defined in node_modules/@types/node/events.d.ts:7
  deprecated

    since v4.0.0

  #### Parameters

  - ##### emitter: EventEmitter

  - ##### event: string | symbol

  #### Returns number

Generated using TypeDoc