code: def complete_io(self, iocb, msg):
          
          if _debug: IOQController._debug("complete_io %r %r", iocb, msg)
  
          # check to see if it is completing the active one
          if iocb is not self.active_iocb:
              raise RuntimeError("not the current iocb")
  
          # normal completion
          IOController.complete_io(self, iocb, msg)
  
          # no longer an active iocb
          self.active_iocb = None
  
          # check to see if we should wait a bit
          if self.wait_time:
              # change our state
              self.state = CTRL_WAITING
              _statelog.debug("%s %s %s" % (_strftime(), self.name, "waiting"))
  
              # schedule a call in the future
              task = FunctionTask(IOQController._wait_trigger, self)
              task.install_task(delta=self.wait_time)
  
          else:
              # change our state
              self.state = CTRL_IDLE
              _statelog.debug("%s %s %s" % (_strftime(), self.name, "idle"))
  
              # look for more to do
              deferred(IOQController._trigger, self)
docs: Called by a handler to return data to the client.