【问题标题】:Implementing heartbeat mechanism in xmpp android在xmpp android中实现心跳机制
【发布时间】:2014-05-15 10:41:58
【问题描述】:

我在聊天应用程序的 android 设备中使用 presistent xmpp 连接。 为了保持连接打开,我想使用 TCP HEARTBEAT 机制。我只想知道心跳步骤何时完成:

1. when a packet is sent on server and a response comes from server (Two steps) 
2. Or just packet sending is done from client side (1 step)

如何使用 smack 库。是否使用 KeepAliveManager 类?

【问题讨论】:

    标签: android tcp xmpp smack


    【解决方案1】:

    只需将 XMPP Ping 用作服务器的心跳。 (a)Smack 会自动执行此操作。您可以在 PingManager 中调整设置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-26
      • 2016-06-25
      • 2018-04-07
      • 1970-01-01
      • 1970-01-01
      • 2014-09-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多