getPeers method
inherited
Returns info about all known peers (both discovered and explicitly added).
When the set of known peers changes, a NetworkEvent::PeerSetChange
is emitted. Calling
this function afterwards returns the new peer info.
Implementation
Future<List<PeerInfo>> getPeers(
) async {
final request = RequestSessionGetPeers(
);
final response = await client.invoke(request);
switch (response) {
case ResponsePeerInfos(value: final value): return value;
default: throw UnexpectedResponse();
}
}