ConnectionEventHandler constructor

ConnectionEventHandler(
  1. {VoidCallback? onConnected,
  2. VoidCallback? onDisconnected,
  3. void onUserDidLoginFromOtherDevice(
    1. String deviceName
    )?,
  4. VoidCallback? onUserDidRemoveFromServer,
  5. VoidCallback? onUserDidForbidByServer,
  6. VoidCallback? onUserDidChangePassword,
  7. VoidCallback? onUserDidLoginTooManyDevice,
  8. VoidCallback? onUserKickedByOtherDevice,
  9. VoidCallback? onUserAuthenticationFailed,
  10. VoidCallback? onTokenWillExpire,
  11. VoidCallback? onTokenDidExpire,
  12. VoidCallback? onAppActiveNumberReachLimit}
)

The chat connection listener callback.

Param onConnected The SDK connects to the chat server successfully.

Param onDisconnected The SDK disconnect from the chat server.

Param onUserDidLoginFromOtherDevice The current user account is logged in to another device.

Param onUserDidRemoveFromServer The current chat user is removed from the server.

Param onUserDidForbidByServer The current chat user is banned by the server.

Param onUserDidChangePassword The current chat user is changed password.

Param onUserDidLoginTooManyDevice The current chat user logged in to many devices.

Param onUserKickedByOtherDevice The current chat user is kicked by another device.

Param onUserAuthenticationFailed The authentication for the chat user failed.

Param onTokenWillExpire The token is about to expire.

Param onTokenDidExpire The token has expired.

Param onAppActiveNumberReachLimit The number of daily active users (DAU) or monthly active users (MAU) for the app has reached the upper limit.

Implementation

ConnectionEventHandler({
  this.onConnected,
  this.onDisconnected,
  this.onUserDidLoginFromOtherDevice,
  this.onUserDidRemoveFromServer,
  this.onUserDidForbidByServer,
  this.onUserDidChangePassword,
  this.onUserDidLoginTooManyDevice,
  this.onUserKickedByOtherDevice,
  this.onUserAuthenticationFailed,
  this.onTokenWillExpire,
  this.onTokenDidExpire,
  this.onAppActiveNumberReachLimit,
});