#1 2013-10-17 05:12:18

yurasek
Member
From: Belarus
Registered: 2011-04-19
Posts: 18

Client monitoring session timeout or disconnection

What is the most optimal method can be used to monitor client-side session timeout or disconnection?

Offline

#2 2013-10-17 07:39:19

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Client monitoring session timeout or disconnection

What do you call "monitoring"?
On which side do you want to track client activity? Server side or client side?

Are not the logs enough?
You have specific information on both sides.

Do you want to have some events triggered at specific states, that's it?

Offline

#3 2013-10-17 19:56:06

yurasek
Member
From: Belarus
Registered: 2011-04-19
Posts: 18

Re: Client monitoring session timeout or disconnection

ab wrote:

Do you want to have some events triggered at specific states, that's it?

Yes it is. Not enough events by which a client could see that sessions has timed out or lost connection.

Offline

#4 2013-10-17 20:15:46

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Client monitoring session timeout or disconnection

yurasek wrote:

Yes it is. Not enough events by which a client could see that sessions has timed out or lost connection.

So only on client side?
Something similar to the callback event triggerred in case of authentication error?

In the meanwhile, the easiest is to inherit from the client class and add your own process to the returnded status.

Offline

#5 2013-12-17 11:22:16

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 90

Re: Client monitoring session timeout or disconnection

Arnaud, so when the connection is lost with the server the best recovery is simply to connect again?


fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...

Offline

#6 2013-12-17 20:51:34

jvillasantegomez
Member
From: Ciudad Habana. Cuba.
Registered: 2013-10-21
Posts: 54

Re: Client monitoring session timeout or disconnection

I think the timeout stuff is a little ugly.

I do see the case for it, but it would be nice if the server remembers the timed out session and returns some message to the client, like:
403
Your session timed out

Or even another custom error code, because on the client we can capture this and later reconnect.

Offline

Board footer

Powered by FluxBB