我正在一个聊天应用程序中使用android设备中的一个前置xmpp连接。为了保持连接打开,我想使用TCP心跳机制。我只想知道心跳步骤什么时候完成:
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 library.Is使用KeepAliveManager类来实现?
发布于 2014-05-15 12:30:59
只需将XMPP页面作为心跳使用到服务器。(a)Smack自动做到这一点。您可以在PingManager中调优设置。
https://stackoverflow.com/questions/23675929
复制相似问题