AgoraConnectionChangedReason Constants Reference

Declared in AgoraEnumerates.h

AgoraConnectionChangedReason

Reasons for the connection state change.

Constants

AgoraConnectionChangedConnecting

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

Declared In AgoraEnumerates.h.

AgoraConnectionChangedJoinSuccess

1: The SDK has joined the channel successfully.

Declared In AgoraEnumerates.h.

AgoraConnectionChangedInterrupted

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

Declared In AgoraEnumerates.h.

AgoraConnectionChangedBannedByServer

3: The connection between the SDK and Agora’s edge server is banned by Agora’s edge server.

Declared In AgoraEnumerates.h.

AgoraConnectionChangedJoinFailed

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

Declared In AgoraEnumerates.h.

AgoraConnectionChangedLeaveChannel

5: The SDK has left the channel.

Declared In AgoraEnumerates.h.

AgoraConnectionChangedInvalidAppId

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

Declared In AgoraEnumerates.h.

AgoraConnectionChangedInvalidChannelName

7: The specified channel name is invalid. Try to rejoin the channel with a valid channel name.

Declared In AgoraEnumerates.h.

AgoraConnectionChangedInvalidToken

8: The generated token is invalid probably due to the following reasons:

  • 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 joinChannelByToken method is different from the uid that you pass for generating the token.

    Declared In AgoraEnumerates.h.

  • AgoraConnectionChangedTokenExpired

    9: The token has expired. Generate a new token from your server.

    Declared In AgoraEnumerates.h.

    AgoraConnectionChangedRejectedByServer

    10: The user is banned by the server.

    Declared In AgoraEnumerates.h.

    AgoraConnectionChangedSettingProxyServer

    11: The SDK tries to reconnect after setting a proxy server.

    Declared In AgoraEnumerates.h.

    AgoraConnectionChangedRenewToken

    12: The token renews.

    Declared In AgoraEnumerates.h.

    AgoraConnectionChangedClientIpAddressChanged

    13: The client IP address has changed, probably due to a change of the network type, IP address, or network port.

    Declared In AgoraEnumerates.h.

    AgoraConnectionChangedKeepAliveTimeout

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

    Declared In AgoraEnumerates.h.

    Declared In

    AgoraEnumerates.h