ConnectionChangedReason enum Null safety

网络连接状态发生改变的原因。

Constants

BannedByServer → const ConnectionChangedReason

网络连接被服务器禁止。

@JsonValue(3)
const ConnectionChangedReason(3)
ClientIpAddressChanged → const ConnectionChangedReason

客户端 IP 地址变更,可能是由于网络类型,或网络运营商的 IP 或端口发生改变引起。

@JsonValue(13)
const ConnectionChangedReason(13)
Connecting → const ConnectionChangedReason

建立网络连接中。

@JsonValue(0)
const ConnectionChangedReason(0)
Interrupted → const ConnectionChangedReason

网络连接中断。

@JsonValue(2)
const ConnectionChangedReason(2)
InvalidAppId → const ConnectionChangedReason

不是有效的 APP ID 或 Token。请更换有效的 APP ID 或 Token 重新加入频道。

@JsonValue(6)
const ConnectionChangedReason(6)
InvalidChannelName → const ConnectionChangedReason

不是有效的频道名。请更换有效的频道名重新加入频道。

@JsonValue(7)
const ConnectionChangedReason(7)
InvalidToken → const ConnectionChangedReason

生成的 Token 无效。一般有以下原因:

  • 在控制台上启用了 App Certificate,但加入频道未使用 Token。当启用了 App Certificate,必须使用 Token。
  • 在调用 RtcEngine.joinChannel 加入频道时指定的 uid 与生成 Token 时传入的 uid 不一致。
@JsonValue(8)
const ConnectionChangedReason(8)
JoinFailed → const ConnectionChangedReason

加入频道失败。SDK 在尝试加入频道 20 分钟后还是没能加入频道,会返回该状态,并停止尝试重连。

@JsonValue(4)
const ConnectionChangedReason(4)
JoinSuccess → const ConnectionChangedReason

成功加入频道。

@JsonValue(1)
const ConnectionChangedReason(1)
KeepAliveTimeout → const ConnectionChangedReason

SDK 和服务器连接保活超时,进入自动重连状态。 详见 ConnectionStateType.Reconnecting

@JsonValue(14)
const ConnectionChangedReason(14)
LeaveChannel → const ConnectionChangedReason

离开频道。

@JsonValue(5)
const ConnectionChangedReason(5)
ProxyServerInterrupted → const ConnectionChangedReason

在云代理模式下,与云代理服务器的连接中断。

@JsonValue(15)
const ConnectionChangedReason(15)
RejectedByServer → const ConnectionChangedReason

此用户被服务器禁止。

@JsonValue(10)
const ConnectionChangedReason(10)
RenewToken → const ConnectionChangedReason

更新 Token 引起网络连接状态改变。

@JsonValue(12)
const ConnectionChangedReason(12)
SettingProxyServer → const ConnectionChangedReason

由于设置了代理服务器,SDK 尝试重连。

@JsonValue(11)
const ConnectionChangedReason(11)
TokenExpired → const ConnectionChangedReason

当前使用的 Token 过期,不再有效,需要重新在你的服务端申请生成 Token。

@JsonValue(9)
const ConnectionChangedReason(9)
values → const List<ConnectionChangedReason>

A constant List of the values in this enum, in order of their declaration.

const List<ConnectionChangedReason>

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited