protocol.py 文件源码

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

项目:BigBrotherBot-For-UrT43 作者: ptitbigorneau 项目源码 文件源码
def send_command(self, *command):
        """
        Send a command to the Frosbite server and return the command
        id which can be used to find the matching reply later on.
        """
        self.getLogger().info("command : %s " % repr(command))
        if len(command) == 1 and type(command[0]) == tuple:
            words = command[0]
        else:
            words = command

        request = EncodeClientRequest(words)
        [sequence, words] = DecodePacket(request)[2:]

        self.getLogger().debug("sending command request #%i: %s " % (sequence, words))
        asyncore.dispatcher_with_send.send(self, request)

        return sequence

    ####################################################################################################################
    #                                                                                                                  #
    #   OTHER METHODS                                                                                                  #
    #                                                                                                                  #
    ####################################################################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号