做&presence; presence />标签需要在基于xmpp的msn客户端中定期发送到服务器吗? [英] Do <presence/> tag needs to be send to the server at regular interval in xmpp based msn client ?

查看:64
本文介绍了做&presence; presence />标签需要在基于xmpp的msn客户端中定期发送到服务器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 


我使用xmpp登录了msn并发送了< presence />它。


它获取了在线标签的状态信息。


现在出现问题,如果没有人向我发送任何消息或没有数据从我的客户端发送,也没有从服务器发送.. 


连接关闭。 


它发生在10之后分钟.. 


所以我们需要发送一些< presence />定期标记以让服务器知道我在线。??


我也不会在回调中获得任何 tcp_pipe_close,


只是我的客户端没有收到服务器的更多数据。  



请帮助我?????? b b b p



谢谢和问候,


Deepak

解决方案

您可以使用XEP0199维护实时连接


http:// xmpp.org/extensions/xep-0199.html





这是一条跟踪:


C:< iq id ='123456'type ='get'> < ping xmlns ='urn:xmpp:ping'/>< / iq>

S:< iq from =" messenger.live.com" ID = QUOT; 123456"到= QUOT; JID / RESOURCE"类型= QUOT;导致" />


每隔几分钟发送一次就足够了。


hi, 

i have logged in msn using xmpp and sent the <presence/> tag.

it fetched me the presence information of the online tags.

now the problem occurs that if no one is sending me the any message or no data is sent from my client side and nor from server .. 

the connection closes down. 

it happens in after 10 mins.. 

so do we need to send some <presence/> tag at regular intervals to let the server know that i am online .??

also i dont get any event tcp_pipe_close in callback also,

its just that no more data from server is received by my client.  

kindly anyne help me ???

Thanks and Regards ,

Deepak

解决方案

You can use XEP0199 to maintain a live connection

http://xmpp.org/extensions/xep-0199.html


Here is a trace:

C: <iq id='123456' type='get'> <ping xmlns='urn:xmpp:ping'/></iq>
S: <iq from="messenger.live.com" id="123456" to="JID/RESOURCE" type="result" />

Send it every couple of minutes and should be enough.


这篇关于做&presence; presence /&gt;标签需要在基于xmpp的msn客户端中定期发送到服务器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆