# ConnectionDelegate

    @objc public protocol ConnectionDelegate: class

The Connection delegate protocol defines the event methods available for channel Connection/DisConnection.

### Optional Callbacks for Connection

- `onConnect(_:)`

  event occur when connection occur with channel.

  #### Declaration

  Swift

      optional func onConnect(error: NSError?)

  #### Parameters

  `error` | connection error

- `onDisconnect(_:)`

  event occur when Disconnection occur with channel.

  #### Declaration

  Swift

      optional func onDisconnect(error: NSError?)

  #### Parameters

  `error` | disconnect error.

- `onPlayerNotice(_:)`

  Called when media player on target device sends playerNotice event to client. It may be change of playback status, error message or informative event about video stream state. See MediaPlayer.PlayerNotice definition for possible values.

  #### Declaration

  Swift

      optional func onPlayerNotice(messageData: [String : AnyObject])

  #### Parameters

  `messageData` | information about player events

© 2016 . All rights reserved. (Last updated: 2016-10-27)

Generated by jazzy ♪♫ v0.7.2, a Realm project.