Skip to content

Commit 30fc7d4

Browse files
committed
Expose connect and disconnect methods for Client
1 parent 6399f65 commit 30fc7d4

File tree

5 files changed

+504
-190
lines changed

5 files changed

+504
-190
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* Expose `EventBuilder` ([Yuki Kishimoto])
4444
* Expose add relay method for `Client` ([Yuki Kishimoto])
4545
* Expose remove relay methods for `Client` ([Yuki Kishimoto])
46+
* Expose connect and disconnect methods for `Client` ([Yuki Kishimoto])
4647
* Expose `Client::send_event_builder` ([Yuki Kishimoto])
4748
* Expose `Client::automatic_authentication` ([Yuki Kishimoto])
4849
* Expose `Client::reset` ([Yuki Kishimoto])

lib/src/rust/api/client.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ abstract class Client implements RustOpaqueInterface {
5858
/// Connect to all added relays
5959
Future<void> connect();
6060

61+
/// Connect to a previously added relay
62+
Future<void> connectRelay({required String url});
63+
64+
/// Disconnect from all relays
65+
Future<void> disconnect();
66+
67+
/// Disconnect relay
68+
Future<void> disconnectRelay({required String url});
69+
6170
/// Disconnect and force remove all relays
6271
Future<void> forceRemoveAllRelays();
6372

0 commit comments

Comments
 (0)