Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration CONNECTION_CHANGED_REASON_TYPE

Reasons for a connection state change.

  • 0: The SDK is connecting to Agora's edge server.
  • 1: The SDK has joined the channel successfully.
  • 2: The connection between the SDK and Agora's edge server is interrupted.
  • 3: The connection between the SDK and Agora's edge server is banned by Agora's edge server.
  • 4: The SDK fails to join the channel for more than 20 minutes and stops reconnecting to the channel.
  • 5: The SDK has left the channel.
  • 6: Invalid App ID.
  • 7: Invalid Channel Name.
  • 8: Invalid Token.
  • 9: Token Expired.
  • 10: This user has been banned by server.
  • 11: SDK reconnects for setting proxy server.
  • 12: Network status change for renew token.
  • 13: Client IP Address changed.
  • 19: The user joins the same channel from different devices using the same user ID.
  • 20: The number of hosts in the channel is already at the upper limit.

Index

Enumeration members

CONNECTION_CHANGED_BANNED_BY_SERVER

CONNECTION_CHANGED_BANNED_BY_SERVER: = 3

3: The user is banned by the server. This error occurs when the user is kicked out the channel from the server.

CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED

CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED: = 13

13: The IP Address of SDK client has changed. i.e., Network type or IP/Port changed by network operator might change client IP address.

CONNECTION_CHANGED_CONNECTING

CONNECTION_CHANGED_CONNECTING: = 0

0: The SDK is connecting to Agora's edge server.

CONNECTION_CHANGED_INTERRUPTED

CONNECTION_CHANGED_INTERRUPTED: = 2

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

CONNECTION_CHANGED_INVALID_APP_ID

CONNECTION_CHANGED_INVALID_APP_ID: = 6

6: The specified App ID is invalid. Try to rejoin the channel with a valid App ID.

CONNECTION_CHANGED_INVALID_CHANNEL_NAME

CONNECTION_CHANGED_INVALID_CHANNEL_NAME: = 7

7: The connection failed since channel name is not valid.

CONNECTION_CHANGED_INVALID_TOKEN

CONNECTION_CHANGED_INVALID_TOKEN: = 8

8: The connection failed since token is not valid, possibly because:

  • The App Certificate for the project is enabled in Console, but you do not use Token when joining the channel. If you enable the App Certificate, you must use a token to join the channel.
  • The uid that you specify in the \ref agora::rtc::IRtcEngine::joinChannel "joinChannel" method is different from the uid that you pass for generating the token.

CONNECTION_CHANGED_JOIN_FAILED

CONNECTION_CHANGED_JOIN_FAILED: = 4

4: The SDK fails to join the channel for more than 20 minutes and stops reconnecting to the channel.

CONNECTION_CHANGED_JOIN_SUCCESS

CONNECTION_CHANGED_JOIN_SUCCESS: = 1

1: The SDK has joined the channel successfully.

CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT

CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT: = 14

14: Timeout for the keep-alive of the connection between the SDK and Agora's edge server. The connection state changes to CONNECTION_STATE_RECONNECTING(4).

CONNECTION_CHANGED_LEAVE_CHANNEL

CONNECTION_CHANGED_LEAVE_CHANNEL: = 5

5: The SDK has left the channel.

CONNECTION_CHANGED_REJECTED_BY_SERVER

CONNECTION_CHANGED_REJECTED_BY_SERVER: = 10

10: The connection is rejected by server. This error usually occurs in the following situations:

  • When the user is already in the channel, and still calls the method to join the channel, for example, \ref IRtcEngine::joinChannel "joinChannel".
  • When the user tries to join a channel during \ref IRtcEngine::startEchoTest "startEchoTest". Once you call \ref IRtcEngine::startEchoTest "startEchoTest", you need to call \ref IRtcEngine::stopEchoTest "stopEchoTest" before joining a channel.

CONNECTION_CHANGED_RENEW_TOKEN

CONNECTION_CHANGED_RENEW_TOKEN: = 12

12: When SDK is in connection failed, the renew token operation will make it connecting.

CONNECTION_CHANGED_SAME_UID_LOGIN

CONNECTION_CHANGED_SAME_UID_LOGIN: = 19

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

since

v3.7.0

CONNECTION_CHANGED_SETTING_PROXY_SERVER

CONNECTION_CHANGED_SETTING_PROXY_SERVER: = 11

11: The connection changed to reconnecting since SDK has set a proxy server.

CONNECTION_CHANGED_TOKEN_EXPIRED

CONNECTION_CHANGED_TOKEN_EXPIRED: = 9

9: The connection failed since token is expired.

CONNECTION_CHANGED_TOO_MANY_BROADCASTERS

CONNECTION_CHANGED_TOO_MANY_BROADCASTERS: = 20

20: The number of hosts in the channel is already at the upper limit.

note

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.

since

v3.7.0