简体   繁体   English

我可以保存openfire的登录会话吗

[英]Can I save login session of openfire

I am new in XMPP. 我是XMPP的新手。 I am making a chat app with Openfire and Smack API. 我正在使用Openfire和Smack API制作聊天应用程序。 In my app, when I open the app after closing it, I have to login every time with saved user in sharedPref. 在我的应用程序中,当我在关闭应用程序后打开该应用程序时,每次必须使用sharedPref中的已保存用户登录。

How can I save the login session, so that I don't have to login every time? 如何保存登录会话,这样就不必每次都登录?

Does XMPP give a session saving facility? XMPP是否提供会话保存功能?

XMPP client server connection is socket based connection and if user is not using the application, it disconnects after some time of inactivity OR it should be disconnected. XMPP客户端服务器连接是基于套接字的连接,如果用户未使用该应用程序,则在不活动一段时间后它将断开连接,或者应断开连接。

So on every application launch you have to perform the login again. 因此,在每次启动应用程序时,您都必须再次执行登录。

From your question, If you want the server to remember the user session and somehow resume it then it's not available in Openfire Server. 根据您的问题,如果您希望服务器记住用户会话并以某种方式恢复它,则它在Openfire Server中不可用。 However, such feature does exists in Enterprise Edition of Ejabberd. 但是,Ejabberd企业版中确实存在这种功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM