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}
)

连接状态监听。

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)达到上限时回调。

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,
});