From bb7e2856623c97127191f76db01116b8781df656 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 12 Mar 2024 10:55:48 +0530 Subject: [PATCH] Added section to retrieve connection id, state and recoveryKey --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 46c8e5de8..dc7de6096 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,13 @@ realtime.connection }); ``` +#### Retrieve connection id, state etc +```dart +String connectionId = realtime.connection.id; +ConnectionState state = realtime.connection.state; +String recoveryKey = realtime.connection.createRecoveryKey(); // https://ably.com/docs/connect/states?q=recovery#connection-state-recover-options +``` + ### Realtime channel #### Create instance of Realtime channel