当前位置: 首页>>代码示例>>Python>>正文


Python Iq.free方法代码示例

本文整理汇总了Python中pyxmpp.iq.Iq.free方法的典型用法代码示例。如果您正苦于以下问题:Python Iq.free方法的具体用法?Python Iq.free怎么用?Python Iq.free使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyxmpp.iq.Iq的用法示例。


在下文中一共展示了Iq.free方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _plain_auth_stage2

# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import free [as 别名]
    def _plain_auth_stage2(self, _unused):
        """Do the second stage (<iq type='set'/>) of legacy "plain"
        authentication.

        [client only]"""
        iq=Iq(stanza_type="set")
        q=iq.new_query("jabber:iq:auth")
        q.newTextChild(None,"username",to_utf8(self.my_jid.node))
        q.newTextChild(None,"resource",to_utf8(self.my_jid.resource))
        q.newTextChild(None,"password",to_utf8(self.password))
        self.send(iq)
        self.set_response_handlers(iq,self.auth_finish,self.auth_error)
        iq.free()
开发者ID:AlexUlrich,项目名称:digsby,代码行数:15,代码来源:clientstream.py

示例2: _auth_stage1

# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import free [as 别名]
    def _auth_stage1(self):
        """Do the first stage (<iq type='get'/>) of legacy ("plain" or
        "digest") authentication.

        [client only]"""
        iq=Iq(stanza_type="get")
        q=iq.new_query("jabber:iq:auth")
        q.newTextChild(None,"username",to_utf8(self.my_jid.node))
        q.newTextChild(None,"resource",to_utf8(self.my_jid.resource))
        self.send(iq)
        self.set_response_handlers(iq,self.auth_stage2,self.auth_error,
                            self.auth_timeout,timeout=60)
        iq.free()
开发者ID:AlexUlrich,项目名称:digsby,代码行数:15,代码来源:clientstream.py

示例3: _digest_auth_stage2

# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import free [as 别名]
    def _digest_auth_stage2(self, _unused):
        """Do the second stage (<iq type='set'/>) of legacy "digest"
        authentication.

        [client only]"""
        iq=Iq(stanza_type="set")
        q=iq.new_query("jabber:iq:auth")
        q.newTextChild(None,"username",to_utf8(self.my_jid.node))
        q.newTextChild(None,"resource",to_utf8(self.my_jid.resource))

        digest = hashlib.sha1(to_utf8(self.stream_id)+to_utf8(self.password)).hexdigest()

        q.newTextChild(None,"digest",digest)
        self.send(iq)
        self.set_response_handlers(iq,self.auth_finish,self.auth_error)
        iq.free()
开发者ID:AlexUlrich,项目名称:digsby,代码行数:18,代码来源:clientstream.py

示例4: free

# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import free [as 别名]
 def free(self):
     """Free the data associated with this `MucIq` object."""
     self.muc_free()
     Iq.free(self)
开发者ID:AdamPrzybyla,项目名称:pyxmpp,代码行数:6,代码来源:muccore.py


注:本文中的pyxmpp.iq.Iq.free方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。