def processResponse(self, ident, code, data): 'internal to the i/o thread w/ recv ctrl; processes incoming response' chan = self.qmap.pop(ident, None) if not chan: return buf = JdwpBuffer() buf.config(*self.sizes) buf.prepareUnpack(data) return chan.put((code, buf))
def processRequest(self, ident, code, data): 'internal to the i/o thread w/ recv ctrl; processes incoming request' chan = self.rmap.get(code) if not chan: return #TODO buf = JdwpBuffer() buf.config(*self.sizes) buf.prepareUnpack(data) return chan.put((ident, buf))
def processResponse(self, ident, code, data): 'internal to the i/o thread w/ recv ctrl; processes incoming response' log.debug("study", "In Connection.processResponse ident=" + str(ident) + "\t code=" + str(code) + "\t data=") chan = self.qmap.pop(ident, None) #从字典中读取,并删除该数据 if not chan: return buf = JdwpBuffer() buf.config(*self.sizes) buf.prepareUnpack(data) return chan.put((code, buf))
def processRequest(self, ident, code, data): 'internal to the i/o thread w/ recv ctrl; processes incoming request' log.debug("study", "In Connection.processRequest ident=" + str(ident) + "\t code=" + str(code) + "\t data=") chan = self.rmap.get(code) #所有中断都由该chan队列处理,每次只是从rmap读出内容,而没有将rmap对应的chan清除 if not chan: return #TODO buf = JdwpBuffer() buf.config(*self.sizes) buf.prepareUnpack(data) return chan.put((ident, buf)) #将解析后的数据压入队列中