EMConnectionEventHandler constructor
- VoidCallback? onConnected,
- VoidCallback? onDisconnected,
- void onUserDidLoginFromOtherDevice(
- LoginExtensionInfo info
- VoidCallback? onUserDidRemoveFromServer,
- VoidCallback? onUserDidForbidByServer,
- VoidCallback? onUserDidChangePassword,
- VoidCallback? onUserDidLoginTooManyDevice,
- VoidCallback? onUserKickedByOtherDevice,
- VoidCallback? onUserAuthenticationFailed,
- VoidCallback? onTokenWillExpire,
- VoidCallback? onTokenDidExpire,
- VoidCallback? onAppActiveNumberReachLimit,
- VoidCallback? onOfflineMessageSyncStart,
- VoidCallback? onOfflineMessageSyncFinish,
~english The chat connection listener callback.
Param onConnected
The SDK connects to the chat server successfully.
Param onDisconnected
The SDK disconnects 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.
Param onOfflineMessageSyncStart
Occurs when the SDK starts pulling offline messages from the server.
Param onOfflineMessageSyncFinish
Occurs when the SDK finishes pulling offline messages from the server.
~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)达到上限时回调。
Param onOfflineMessageSyncStart
开始从服务器拉取离线消息时触发。
Param onOfflineMessageSyncFinish
从服务器拉取离线消息结束时触发。
~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,
this.onOfflineMessageSyncStart,
this.onOfflineMessageSyncFinish,
});