ConnectionChangedReason enum

Reasons causing the change of the connection state.

Inheritance

Constructors

ConnectionChangedReason()
const

Values

Connecting → const ConnectionChangedReason

0: The SDK is connecting to the Agora edge server.

JoinSuccess → const ConnectionChangedReason

1: The SDK has joined the channel successfully.

Interrupted → const ConnectionChangedReason

2: The connection between the SDK and the Agora edge server is interrupted.

BannedByServer → const ConnectionChangedReason

3: The connection between the SDK and the Agora edge server is banned by the Agora edge server. This error occurs when the user is kicked out of the channel by the server.

JoinFailed → const ConnectionChangedReason

4: The SDK fails to join the channel. When the SDK fails to join the channel for more than 20 minutes, this error occurs and the SDK stops reconnecting to the channel.

LeaveChannel → const ConnectionChangedReason

5: The SDK has left the channel.

InvalidAppId → const ConnectionChangedReason

6: The connection failed because the App ID is not valid. Please rejoin the channel with a valid App ID.

InvalidChannelName → const ConnectionChangedReason

7: The connection failed since channel name is not valid. Please rejoin the channel with a valid channel name.

InvalidToken → const ConnectionChangedReason

8: The connection failed because the token is not valid. Typical reasons include: The App Certificate for the project is enabled in Agora Console, but you do not use a token when joining the channel. If you enable the App Certificate, you must use a token to join the channel. The uid specified when calling joinChannel to join the channel is inconsistent with the uid passed in when generating the token.

TokenExpired → const ConnectionChangedReason

9: The connection failed since token is expired.

RejectedByServer → const ConnectionChangedReason

10: The connection is rejected by server. Typical reasons include: The user is already in the channel and still calls a method, for example, joinChannel, to join the channel. Stop calling this method to clear this error. The user tries to join the channel when conducting a pre-call test. The user needs to call the channel after the call test ends.

SettingProxyServer → const ConnectionChangedReason

11: The connection state changed to reconnecting because the SDK has set a proxy server.

RenewToken → const ConnectionChangedReason

12: The connection state changed because the token is renewed.

ClientIpAddressChanged → const ConnectionChangedReason

13: The IP address of the client has changed, possibly because the network type, IP address, or port has been changed.

KeepAliveTimeout → const ConnectionChangedReason

14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The connection state changes to Reconnecting.

SameUidLogin → const ConnectionChangedReason

19: Join the same channel from different devices using the same user ID.

TooManyBroadcasters → const ConnectionChangedReason

20: The number of hosts in the channel is already at the upper limit. This enumerator is reported only when the support for 128 users is enabled. The maximum number of hosts is based on the actual number of hosts configured when you enable the 128-user feature.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
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

values → const List<ConnectionChangedReason>
A constant List of the values in this enum, in order of their declaration.