在XMPP设备上丢失的消息断开连接 [英] Lost messages over XMPP on device disconnected

查看:355
本文介绍了在XMPP设备上丢失的消息断开连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图制定了XMPP转弯基础游戏。 (唯一的解决办法,我发现了多平台游戏)。我可以毫无问题发送消息。如果其他用户不在线,服务器(Openfire的),保存以后交付。

I'm trying to develop a turn base game over XMPP. ( The only solution I found for multiplatform game ). I can send messages without problems. If the other user isn't online, the server (OpenFire) save it for later deliver.

问题卡梅斯当设备改变网络(从3克变化的WiFi,改变3克IP ...)或设备丢失网络(关闭3G,WIFI或丢失连接)。服务器认为该设备是在线和发送信息,但它(obviusly)从来没有到达,所以数据包丢失。

The problem cames when a device change the network ( change from 3g to WiFi, change 3g IP... ) or the device lost the network ( turn off 3g, wifi or lost connection ). The server thinks that the device is online and send the message but it ( obviusly ) never arrive, so packet is lost.

我知道一个解决方案。实施ACK过我的比赛协议,但我不喜欢这个主意了。你有什么其他的建议?我认为这是一个服务器的问题。你知道另一台服务器巫实现了TCP或ACK?

I know one solution. Implement ACK over my game protocol, but I don't like this idea to much. Do you have any other suggestion? I think this is a server problem. Do you know another server witch implements TCP or ACK?

感谢你!

编辑:我这样做:连接设备到服务器。我拒绝了3G和WiFi连接的设备。 Android和服务器仍然以为连接还活着。

I do that: Connect device to server. I turn down the 3G and WiFi connectivity to the device. Android and the server still thinking that the connection is alive.

http://issues.igniterealtime.org/browse/SMACK-331

PD:我问OpenFeint的,因为他们多人的API,但他们并没有asnwer我......

PD: I ask to openfeint for they multiplayer api, but they didn't asnwer me...

推荐答案

虽然BOSH将可能工作在这种情况下,另一种选择是 XEP-0198 :流管理。这将让你拥有所有成为全连接插座的性能,以及快速重新连接,积极ACKING,虽然未获得确认或断开连接在两个方向上排队。

Although BOSH will likely work in this case, another option is XEP-0198: Stream Management. This will allow you to have all of the performance of a fully-connected socket, along with quick reconnects, positive acking, and queuing while un-acked or disconnected in both directions.

这篇关于在XMPP设备上丢失的消息断开连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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