ChatDisconnectErrorCode class abstract final

~english The reason codes carried by ConnectionEventHandler.onDisconnected.

The values are identical to the platform SDK error codes, and the SDK passes them through unchanged, so a code that is not listed here may still be received.

The reasons fall into two groups:

  • Logout reasons: the local login state is no longer valid and the user has to log in again.
  • Connection reasons: the connection broke while the user stays logged in, and the SDK reconnects automatically.

Note: an expired token does not trigger ConnectionEventHandler.onDisconnected; it is reported by ConnectionEventHandler.onTokenDidExpire instead. ~end

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

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

原因分为两类:

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

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

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
~english The daily active users (DAU) or monthly active users (MAU) of the app has reached the upper limit. ~end
EXCEED_SERVICE_LIMIT → const int
~english The number of users or the service quota of the app exceeds the limit. ~end
INVALID_PARAM → const int
~english The parameters used to set up the connection are invalid. ~end
INVALID_TOKEN → const int
~english The token does not match the login information. ~end
NETWORK_ERROR → const int
~english The network is unavailable.
SERVER_DECRYPTION_FAILED → const int
~english The transfer decryption failed. ~end
SERVER_GET_DNSLIST_FAILED → const int
~english No available server address can be obtained. ~end
SERVER_NOT_REACHABLE → const int
~english The server is not reachable, for example the connection timed out, the DNS resolution failed, or the connection was refused.
SERVER_SERVICE_RESTRICTED → const int
~english The service of the app is restricted by the server. ~end
SERVER_UNKNOWN_ERROR → const int
~english An unknown server error occurred, for example an IO error or an unexpected closing of the connection stream. ~end
USER_BIND_ANOTHER_DEVICE → const int
~english The account is bound to another device and cannot log in on this device. ~end
USER_DEVICE_CHANGED → const int
~english The login device differs from the previous one, and the user has to log in again.
USER_KICKED_BY_CHANGE_PASSWORD → const int
~english The password of the current account has been changed. ~end
USER_KICKED_BY_OTHER_DEVICE → const int
~english The current account is kicked offline by another device. ~end
USER_LOGIN_ANOTHER_DEVICE → const int
~english The current account is logged in on another device.
USER_LOGIN_TOO_MANY_DEVICES → const int
~english The number of devices the account is logged in on exceeds the limit. ~end
USER_NOT_FOUND → const int
~english The user does not exist. ~end
USER_REMOVED → const int
~english The current account has been removed from the server. ~end