getHighestSeenProtocolVersion method
inherited
Returns the highest protocol version of all known peers.
If this is higher than our version it likely
means we are using an outdated version of Ouisync. When a peer with higher protocol version
is found, a NetworkEvent::ProtocolVersionMismatch
is emitted.
Implementation
Future<int> getHighestSeenProtocolVersion(
) async {
final request = RequestSessionGetHighestSeenProtocolVersion(
);
final response = await client.invoke(request);
switch (response) {
case ResponseU64(value: final value): return value;
default: throw UnexpectedResponse();
}
}