connect method
This will initialize the manager with bootstrap relays. If you don't give any, will use some predefined
Implementation
Future<void> connect(
{Iterable<String> urls = DEFAULT_BOOTSTRAP_RELAYS}) async {
bootstrapRelays = [];
for (String url in urls) {
String? clean = cleanRelayUrl(url);
if (clean != null) {
bootstrapRelays.add(clean);
}
}
if (bootstrapRelays.isEmpty) {
bootstrapRelays = DEFAULT_BOOTSTRAP_RELAYS;
}
await Future.wait(
urls.map((url) => connectRelay(url)).toList())
.whenComplete(() {
if (!_seedRelaysCompleter.isCompleted) {
_seedRelaysCompleter.complete();
}
});
}