### Hierarchy

- TypedEventEmitter<Events>
  - Connection

## Index

### Interfaces

- Events

### Constructors

- constructor

### Properties

- device
- isOpen
- defaultMaxListeners

### Methods

- _on
- addListener
- close
- emit
- eventNames
- getMaxListeners
- listenerCount
- listeners
- on
- once
- open
- prependListener
- prependOnceListener
- removeAllListeners
- removeListener
- send
- sendBlank
- setMaxListeners
- listenerCount

## Constructors

### constructor

- new Connection(device: AppleTV): Connection

- Overrides TypedEventEmitter.constructor

  - Defined in lib/connection.ts:25

  #### Parameters

  - ##### device: AppleTV

  #### Returns Connection

## Properties

### device

device: AppleTV

- Defined in lib/connection.ts:27

### isOpen

isOpen: boolean

- Defined in lib/connection.ts:21

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

- Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:907

## Methods

### _on

- _on(event: string, callback: function): this

- Inherited from TypedEventEmitter._on

  - Defined in lib/typed-events.ts:8

  #### Parameters

  - ##### event: string

  - ##### callback: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### addListener

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

- Inherited from EventEmitter.addListener

  Overrides EventEmitter.addListener

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:909

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### close

- close(): void

- - Defined in lib/connection.ts:120

  #### Returns void

### emit

- emit(event: keyof Events, payload?: T[keyof T]): boolean

- Inherited from TypedEventEmitter.emit

  Overrides EventEmitter.emit

  - Defined in lib/typed-events.ts:16

  #### Parameters

  - ##### event: keyof Events

  - ##### Optional payload: T[keyof T]

  #### Returns boolean

### eventNames

- eventNames(): Array<string | symbol>

- Inherited from EventEmitter.eventNames

  Overrides EventEmitter.eventNames

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:920

  #### Returns Array<string | symbol>

### getMaxListeners

- getMaxListeners(): number

- Inherited from EventEmitter.getMaxListeners

  Overrides EventEmitter.getMaxListeners

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:917

  #### Returns number

### listenerCount

- listenerCount(type: string | symbol): number

- Inherited from EventEmitter.listenerCount

  Overrides EventEmitter.listenerCount

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:921

  #### Parameters

  - ##### type: string | symbol

  #### Returns number

### listeners

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

- Inherited from EventEmitter.listeners

  Overrides EventEmitter.listeners

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:918

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### on

- on(event: keyof Events, callback: function): this

- Inherited from TypedEventEmitter.on

  Overrides EventEmitter.on

  - Defined in lib/typed-events.ts:12

  #### Parameters

  - ##### event: keyof Events

  - ##### callback: function

    - - (arg: T[keyof T]): void

      - #### Parameters

        - ##### arg: T[keyof T]

        #### Returns void

  #### Returns this

### once

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

- Inherited from EventEmitter.once

  Overrides EventEmitter.once

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:911

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### open

- open(): Promise<void>

- - Defined in lib/connection.ts:107

  #### Returns Promise<void>

### prependListener

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

- Inherited from EventEmitter.prependListener

  Overrides EventEmitter.prependListener

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:912

  #### 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 /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:913

  #### 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 /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:915

  #### Parameters

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

  #### Returns this

### removeListener

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

- Inherited from EventEmitter.removeListener

  Overrides EventEmitter.removeListener

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:914

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### send

- send(message: ProtoMessage<__type>, waitForResponse: boolean, credentials?: Credentials): Promise<Message>

- - Defined in lib/connection.ts:141

  #### Parameters

  - ##### message: ProtoMessage<__type>

  - ##### waitForResponse: boolean

  - ##### Optional credentials: Credentials

  #### Returns Promise<Message>

### sendBlank

- sendBlank(typeName: string, waitForResponse: boolean, credentials?: Credentials): Promise<Message>

- - Defined in lib/connection.ts:124

  #### Parameters

  - ##### typeName: string

  - ##### waitForResponse: boolean

  - ##### Optional credentials: Credentials

  #### Returns Promise<Message>

### setMaxListeners

- setMaxListeners(n: number): this

- Inherited from EventEmitter.setMaxListeners

  Overrides EventEmitter.setMaxListeners

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:916

  #### Parameters

  - ##### n: number

  #### Returns this

### Static listenerCount

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

- Inherited from EventEmitter.listenerCount

  - Defined in /Users/evan/Projects/Github/node-appletv/node_modules/@types/node/index.d.ts:906

  #### Parameters

  - ##### emitter: EventEmitter

  - ##### event: string | symbol

  #### Returns number

Generated using TypeDoc