def recv(self, count=10000):
    """ receive message until response is last transaction id or received count's message """
    while count>0:
      count = count - 1
      # recv message and convert to XML object
      txt = self.protocol.recv_msg()
      res = xml.dom.minidom.parseString(txt)
      # log messages {{{
      if self.debug:
        self.ui.tracewin.write( str(self.msgid) + ' : recv <===== {{{   ' + txt)
        self.ui.tracewin.write('}}}')
      # handle message
      self.handle_msg(res)
      # exit, if response's transaction id == last transaction id
      try:
        if int(res.firstChild.getAttribute('transaction_id')) == int(self.msgid):
          return
      except:
        pass
dataset/ETHPy150Open doozr/Xdebug-for-Vim/plugin/debugger.py/Debugger.recv/original