pull/8/head
Nicolas Jouanin 2015-07-08 22:47:21 +02:00
rodzic c744169a7d
commit ec8b73cfaf
2 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -18,3 +18,7 @@ class PingRespPacket(MQTTPacket):
super().__init__(header)
self.variable_header = None
self.payload = None
@classmethod
def build(cls):
return cls()

Wyświetl plik

@ -47,3 +47,7 @@ class BrokerProtocolHandler(ProtocolHandler):
# TODO : implements this correcly (manage authentication, cleansession, ...)
self.logger.debug("Connect received")
yield from self.outgoing_queue.put(ConnackPacket.build(0, ReturnCode.CONNECTION_ACCEPTED))
@asyncio.coroutine
def handle_pingreq(self, pingreq: PingReqPacket):
yield from self.outgoing_queue.put(PingRespPacket.build())