问题描述
我知道,任何会话都将在对Quickblox服务器的最后一个请求(在2个小时之前发出)之后过期.创建会话时,我可以找到 [QBBaseModule sharedModule] .tokenExpirationDate
,但是我不确定它如何工作以及如何检查会话是否有效?
I know that, any session will be expired after last request (made before 2 hours) to the Quickblox server. When I create a session, I'm able to find [QBBaseModule sharedModule].tokenExpirationDate
but I'm not sure how it works and how should I check for whether session is live or expired?
-
如何检查会话是实时的还是过期的?
How to check whether session is live or expired?
如果我创建一个会话,接下来的2个小时我会得到 [QBBaseModule sharedModule] .tokenExpirationDate
,现在我将在一个小时内向服务器发出请求,还要更新 [QBBaseModule sharedModule] .tokenExpirationDate
日期吗?
If I create a session, I'll get [QBBaseModule sharedModule].tokenExpirationDate
for next 2 hours, now within an hour I'll made a request to the server, would it update [QBBaseModule sharedModule].tokenExpirationDate
date too?
推荐答案
- 通过检查 tokenExpirationDate . 在QuickBlox的每个响应中,
- tokenExpirationDate 都会更新.答案是-是的.
- By checking tokenExpirationDate.
- tokenExpirationDate is updated in every response from QuickBlox. So answer is - yes.
这篇关于如何在Quickblox iOS SDK中检查会话是实时的还是过期的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!