ChatDisconnectErrorCode class abstract final

ConnectionEventHandler.onDisconnected 携带的断开原因码。

数值与平台 SDK 的错误码一致,SDK 原样透传,因此这里未列出的原因码也可能收到。

原因分为两类:

  • 退出原因:本地登录态已失效,需要重新登录;
  • 连接原因:连接中断但用户仍处于登录态,SDK 会自动重连。

注意:token 过期不会触发 ConnectionEventHandler.onDisconnected, 而是通过 ConnectionEventHandler.onTokenDidExpire 通知。

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

APP_ACTIVE_NUMBER_REACH_LIMITATION → const int
应用的日活跃用户数(DAU)或月活跃用户数(MAU)达到上限。
EXCEED_SERVICE_LIMIT → const int
应用的用户数或服务额度超限。
INVALID_PARAM → const int
建立连接所用的参数无效。
INVALID_TOKEN → const int
token 与登录信息不匹配。
NETWORK_ERROR → const int
网络不可用。
SERVER_DECRYPTION_FAILED → const int
传输解密失败。
SERVER_GET_DNSLIST_FAILED → const int
无法获取可用的服务器地址。
SERVER_NOT_REACHABLE → const int
无法连接服务器,例如连接超时、DNS 解析失败或连接被拒绝。
SERVER_SERVICE_RESTRICTED → const int
应用的服务被服务器禁用。
SERVER_UNKNOWN_ERROR → const int
发生未知的服务器错误,例如 IO 错误或连接流异常关闭。
USER_BIND_ANOTHER_DEVICE → const int
账号已与其他设备绑定,无法在本设备登录。
USER_DEVICE_CHANGED → const int
登录设备与上次不同,需要重新登录。
USER_KICKED_BY_CHANGE_PASSWORD → const int
当前账号的密码已被修改。
USER_KICKED_BY_OTHER_DEVICE → const int
当前账号被其他设备踢下线。
USER_LOGIN_ANOTHER_DEVICE → const int
当前账号在其他设备登录。
USER_LOGIN_TOO_MANY_DEVICES → const int
账号登录的设备数超过限制。
USER_NOT_FOUND → const int
用户不存在。
USER_REMOVED → const int
当前账号已被服务器删除。