Source
void ack(int ackId) { ConnectionAckGroup findAckGroup; for (ConnectionAckGroup ackGroup in pendingAcks) { if (ackGroup.ackId == ackId) { findAckGroup = ackGroup; break; } else if (ackGroup.ackId < ackId) { findAckGroup = ackGroup; } } if (findAckGroup != null) { int ts = (new DateTime.now()).millisecondsSinceEpoch; do { ConnectionAckGroup ackGroup = pendingAcks.removeFirst(); ackGroup.ackAll(ackId, ts); if (ackGroup == findAckGroup) { break; } } while (findAckGroup != null); } }