social_handler.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:PokemonGo-Bot 作者: PokemonGoF 项目源码 文件源码
def initialize(self):
        try:
            if DEBUG_ON:
                print('connect again')

            self._mqttc = mqtt.Client(None)
            self._mqttc.on_message = self.mqtt_on_message
            self._mqttc.on_connect = self.mqtt_on_connect
            self._mqttc.on_subscribe = self.mqtt_on_subscribe
            self._mqttc.on_publish = self.mqtt_on_publish
            self._mqttc.on_disconnect = self.on_disconnect

            # Enable this line if you are doing the snip code, off stress
            # self._mqttc.loop_start()
        except TypeError:
            print('Connect to mqtter error')
            return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号