Skip to content

Commit

Permalink
Added section to retrieve connection id, state and recoveryKey
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Mar 12, 2024
1 parent bc84b92 commit bb7e285
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb7e285

Please sign in to comment.