def main():
"""
Function to run if this is the entry point and not imported like a module
:return:
"""
consumer = ParlayConsumer()
reactor.listenMulticast(CONSUMER_RESPONSE_PORT, consumer, listenMultiple=True)
def print_and_exit():
consumer.print_output()
reactor.stop()
reactor.callLater(1.5, print_and_exit)
reactor.run()
评论列表
文章目录