parseResponse method
Implementation
@override
JoinGroupResponse parseResponse(List<int> bytes) {
final response =
_matching(JoinGroupResponse.fromBytes(bytes), correlationId);
if (response.errorCode == 0 &&
!protocols.any((p) => p.name == response.protocolName)) {
throw const FormatException('Coordinator selected an unoffered protocol');
}
if (response.errorCode == 0 &&
memberId.isNotEmpty &&
response.memberId != memberId) {
throw const FormatException('Coordinator changed an existing member ID');
}
return response;
}