Interface ChatConnectEventListener
Methods
Optional
onAppActiveNumberReachLimit
- onAppActiveNumberReachLimit(): void
Returns void
Optional
onConnected
- onConnected(): void
Returns void
Optional
onDisconnected
- onDisconnected(): void
Returns void
Optional
onTokenDidExpire
- onTokenDidExpire(): void
Returns void
Optional
onTokenWillExpire
- onTokenWillExpire(): void
Returns void
Optional
onUserAuthenticationFailed
- onUserAuthenticationFailed(): void
Returns void
Optional
onUserDidChangePassword
- onUserDidChangePassword(): void
Returns void
Optional
onUserDidForbidByServer
- onUserDidForbidByServer(): void
Returns void
Optional
onUserDidLoginFromOtherDevice
- onUserDidLoginFromOtherDevice(deviceName?): void
Parameters
Optional
deviceName: string
Returns void
Optional
onUserDidLoginFromOtherDeviceWithInfo
- onUserDidLoginFromOtherDeviceWithInfo(params): void
Parameters
- params: {
deviceName: string;
ext?: string;
}deviceName: string
Optional
ext?: string
Returns void
Optional
onUserDidLoginTooManyDevice
- onUserDidLoginTooManyDevice(): void
Returns void
Optional
onUserDidRemoveFromServer
- onUserDidRemoveFromServer(): void
Returns void
Optional
onUserKickedByOtherDevice
- onUserKickedByOtherDevice(): void
Returns void
网络连接状态监听器。
在不稳定的网络环境断网时,SDK 可以接收到已断开连接的回调。
SDK 会自动尝试重连,不需要你手动操作。
以下为两种连接状态回调:
onConnected
: 当网络连接成功时提示已连接。onDisconnected
: 当网络连接断开时提示已断开连接。Adds a connection event listener:
移除连接事件监听器: