onConnectionLost property

(void Function(RtcConnection connection)?) onConnectionLost
final

Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted. The SDK triggers this callback when it cannot connect to the server 10 seconds after calling the joinChannel 2/2 method, regardless of whether it is in the channel. If the SDK fails to rejoin the channel within 20 minutes after disconnecting, the SDK will stop trying to reconnect.

  • connection The connection information. See RtcConnection .

Implementation

final void Function(RtcConnection connection)? onConnectionLost;