+ self._rq.append(request)
+ self._check_outbound()
+
+ def _check_outbound(self):
+ while True:
+ try: request = self._rq[0]
+ except IndexError: request = None
+ if request and request.finished:
+ self._rq.popleft()
+ continue
+
+ # now request is an unfinished request, or None
+ try: (queuetime, packet) = self._pq[0]
+ except: IndexError:
+ # no packets, oh well
+ continue
+
+ age = time.time() - queuetime