Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration ConnectionStateType

Connection states.

Index

Enumeration members

Connected

Connected: = 3

3: The SDK is connected to Agora's edge server and joins a channel. You can now publish or subscribe to a media stream in the channel. If the connection to the channel is lost because, for example, the network is down or switched, the SDK automatically tries to reconnect and triggers:

Connecting

Connecting: = 2

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

Disconnected

Disconnected: = 1

1: The SDK is disconnected from Agora's edge server.

Failed

Failed: = 5

5: The SDK fails to connect to Agora's edge server or join the channel. You must call leaveChannel to leave this state, and call joinChannel again to rejoin the channel.

If the SDK is banned from joining the channel by Agora’s edge server (through the RESTful API), the SDK triggers the ConnectionStateChanged callbacks.

Reconnecting

Reconnecting: = 4

4: The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.

  • If the SDK cannot rejoin the channel within 10 seconds after being disconnected from Agora’s edge server, the SDK triggers the ConnectionLost callback, stays in the Reconnecting state, and keeps rejoining the channel.

Generated using TypeDoc