notifyResponse method
Hands an incoming message to whoever is waiting for it. Returns false when nothing matched, which usually means the request already timed out.
Implementation
bool notifyResponse(IsoMsg message) {
final String key;
try {
key = keyOf(message);
} catch (_) {
_unmatched++;
return false;
}
final Completer<IsoMsg>? completer = _pending.remove(key);
if (completer == null || completer.isCompleted) {
_unmatched++;
return false;
}
completer.complete(message);
return true;
}