def handlePUBLISH(self, response):
if  response.qos == <NUM_LIT:0>:<EOL><INDENT>log.debug("<STR_LIT>" , packet="<STR_LIT>", response=response)<EOL>self._deliver(response)<EOL><DEDENT>elif response.qos == <NUM_LIT:1>:<EOL><INDENT>log.debug("<STR_LIT>" , packet="<STR_LIT>", response=response)<EOL>reply = PUBACK()<EOL>reply.msgId = response.msgId<EOL>log.debug("<STR_LIT>" , packet="<STR_LIT>", response=response)<EOL>self.transport.write(reply.encode())<EOL>self._deliver(response)<EOL><DEDENT>elif response.qos == <NUM_LIT:2>:<EOL><INDENT>log.debug("<STR_LIT>" , packet="<STR_LIT>", response=response)<EOL>self.factory.windowPubRx[self.addr][response.msgId] = response<EOL>reply = PUBREC()<EOL>reply.msgId = response.msgId<EOL>log.debug("<STR_LIT>" , packet="<STR_LIT>", response=response)<EOL>self.transport.write(reply.encode())<EOL><DEDENT>
Handle PUBLISH control packet received.