ConnectionChangedReasonType
The reason for a change in network connection state.
Enumerations
- ConnectionChangedConnecting
- 0: Connecting to the network.
- ConnectionChangedJoinSuccess
- 1: Successfully joined the channel.
- ConnectionChangedInterrupted
- 2: Network connection interrupted.
- ConnectionChangedBannedByServer
- 3: Network connection is banned by the server. For example, this status is returned when the user is kicked out of the channel.
- ConnectionChangedJoinFailed
- 4: Failed to join the channel. If the SDK fails to join the channel after trying for 20 minutes, this status is returned and the SDK stops attempting to reconnect. Prompt the user to switch networks and try joining the channel again.
- ConnectionChangedLeaveChannel
- 5: Left the channel.
- ConnectionChangedInvalidAppId
- 6: The App ID is invalid. Use a valid App ID to rejoin the channel and ensure the App ID matches the one generated in the Agora Console.
- ConnectionChangedInvalidChannelName
- 7: The channel name is invalid. Use a valid channel name to rejoin the channel. A valid channel name is a string within 64 bytes. The supported character set includes 89 characters:
- ConnectionChangedInvalidToken
- 8: The Token is invalid. Possible reasons include:
- Your project has App Certificate enabled but you did not use a Token to join the channel.
- The user ID specified when calling joinChannel does not match the one used to generate the Token.
- The Token used to join the channel does not match the generated Token.
- You use a Token to join the channel if App Certificate is enabled.
- The user ID used to generate the Token matches the one used to join the channel.
- The Token used to join the channel matches the generated Token.
- ConnectionChangedTokenExpired
- 9: The current Token has expired. Generate a new Token on your server and rejoin the channel with the new Token.
- ConnectionChangedRejectedByServer
- 10: This user is banned by the server. Possible reasons include:
- The user has already joined the channel and calls the join channel API again, such as joinChannel. Stop calling this method.
- The user tries to join a channel during a call test. Wait until the test ends before joining the channel.
- ConnectionChangedSettingProxyServer
- 11: The SDK is attempting to reconnect due to proxy server settings.
- ConnectionChangedRenewToken
- 12: The network connection state changed due to a Token renewal.
- ConnectionChangedClientIpAddressChanged
- 13: The client IP address has changed. If this status code is received multiple times, prompt the user to switch networks and try rejoining the channel.
- ConnectionChangedKeepAliveTimeout
- 14: The connection between the SDK and the server timed out. The SDK enters automatic reconnection mode.
- ConnectionChangedRejoinSuccess
- 15: Successfully rejoined the channel.
- ConnectionChangedLost
- 16: The SDK lost connection with the server.
- ConnectionChangedEchoTest
- 17: The connection state changed due to an echo test.
- ConnectionChangedClientIpAddressChangedByUser
- 18: The local IP address was changed by the user.
- ConnectionChangedSameUidLogin
- 19: The same UID joined the same channel from a different device.
- ConnectionChangedTooManyBroadcasters
- 20: The number of broadcasters in the channel has reached the limit.