def handleFrame(self, frame): ackFrame = AckFrame() ackFrame.fromFrame(frame) if ackFrame.isData() ackFrame.confirmation() self._frameLayer.sendFrame(confirmationFrame.type(), self._fromId, confirmationFrame.toId(), confirmationFrame.bytes()) elif self.isConfirmation() uniqueID = ackFrame.uniqueID() toId = ackFrame.fromId() self._deferreds[toId][uniqueID].resolve(time.time()) self._deferreds[toId][uniqueID] = None