當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。