findPrevious method
Checks if the specified key is already associated with a previous exchange and otherwise associates the key with the exchange specified.
Implementation
@override
CoapExchange? findPrevious(final int? key, final CoapExchange exchange) {
CoapExchange? prev;
if (_incomingMessages.containsKey(key)) {
prev = _incomingMessages[key];
}
_incomingMessages[key] = exchange;
return prev;
}