且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我们如何才能结束praticular用户的XMPP会话和注销形成聊天

更新时间:2023-12-04 19:30:10

全部发送presence数据包发送到服务器的第一,那么你就应该注销。这样,你的会话将被杀死。

First of all send presence packet to server and then you should logout. This way your session will be killed.

Presence pr=new Presence(Presence.Type.unavailable);
connection.sendPacket(pr);
connection.disconnect();

它会先下线,然后让你断开连接后从server.Hope它会help.Thanks。

it will first made you offline and then after disconnect from server.Hope it will help.Thanks.