XMPPプロトコルを使用するアプリケーションを作成します。最初は開発を開始し、デバッグにXMPPサーバーを使用しました。それはOkでした。私たちは、グラフィックファイルをローカルに保存し、ユーザープレゼンスアップデートを受信している間にファイルハッシュをチェックすることによって、冗長なアバターロードを防止しました。XMPP Openfireサーバは依然としてユーザーのアバターグラフィックを送信し続けます。
しかし、今、私たちは新しいOpenfilreサーバに切り替え、それは私たちが電子名刺だけでなく、すぐに私達のユーザーがログインした後に、いくつかのメッセージを使用してを要求したときだけでなく、アバターたちに利用可能なすべてのユーザーを送信し続ける:
<message id="[email protected][email protected]__jBUhd" to="[email protected]/FFFChat" from="[email protected]">
<event xmlns="http://jabber.org/protocol/pubsub#event">
<items node="urn:xmpp:avatar:data">
<item id="66d0dee0216e5466fe17403f1da16aa39d4e1698">
<data xmlns="urn:xmpp:avatar:data">... SOME BIG CHUNK OF DATA ...</data>
</item>
</items>
</event>
<delay xmlns="urn:xmpp:delay" stamp="2012-03-16T00:00:32.298Z"/>
<addresses xmlns="http://jabber.org/protocol/address">
<address jid="[email protected]/53bf00a8" type="replyto"/>
</addresses>
</message>
それは不思議私を続けていますどのような正確な発信メッセージがOpenfireから要求されますか?それとも、Openfireサーバーは、常に私たちにすべてのアバターグラフィックを送信するように構成されていますか?
この冗長トラフィックが発生しないようにこれを解決するにはどうすればよいですか?
は、念のために、これらの送信メッセージです:
<stream:stream to="fffchat.openfire.local" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<?xml version="1.0"?>
<stream:stream to="fffchat.openfire.local" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9Imphc29uIixyZWFsbT0icHBpY2hhdCIsbm9uY2U9ImVhcGVpTlNFZ3NOZzRXRFlsVC9zd1cyLzVWbzMzQWlsYzRvZWFRRFIiLGNub25jZT0iMDBERUFEQkVF
<auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">AGphc29uAGFiYzEyMw==</auth>
<?xml version="1.0"?>
<stream:stream to="fffchat.openfire.local" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<iq id="_xmpp_bind1" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>PPIChat</resource></bind></iq>
<iq id="_xmpp_session1" type="set"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>
<iq id="roster1" type="get"><query xmlns="jabber:iq:roster"/></iq>
<presence><show>chat</show><status>online</status><x xmlns="vcard-temp:x:update"><photo>16286eb46a54fb48d70dc4fbd548bcd16f78cd34</photo></x></presence>
<iq type="get"><query xmlns="jabber:iq:private"><ppidata xmlns="ppi:userdata:favorites"/></query></iq>
おかげでジョーを、本当に正確な要求を提供するために、注意を払いました。それは私にエラーコード400を返します。奇妙な。私たちのクライアントからそのようなトラフィックが発生することはありません。 – AlexanderVX