negotiateVersion static method
Finds the highest common version between client and server
Implementation
static int? negotiateVersion(List<int> clientVersions) {
for (final version in supportedVersions) {
if (clientVersions.contains(version)) {
return version;
}
}
return null;
}