EMConnectionEventHandler constructor

EMConnectionEventHandler({
  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,
})

~english 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.

~end

~chinese 连接状态监听。

Param onConnected 成功连接到 chat 服务器时触发的回调。

Param onDisconnected 和 chat 服务器断开连接时触发的回调。

Param onUserDidLoginFromOtherDevice 其他设备登录回调。

Param onUserDidRemoveFromServer 被服务器移除回调。

Param onUserDidForbidByServer 被服务器禁止连接回调。

Param onUserDidChangePassword 用户密码变更回调。

Param onUserDidLoginTooManyDevice 登录设备过多回调。

Param onUserKickedByOtherDevice 被其他设备踢掉回调。

Param onUserAuthenticationFailed 鉴权失败回调。

Param onTokenWillExpire Agora token 即将过期时回调。

Param onTokenDidExpire Agora token 已过期时回调。

Param onAppActiveNumberReachLimit 应用程序的日活跃用户数量(DAU)或月活跃用户数量(MAU)达到上限时回调。 ~end

Implementation

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