Hi there,
You can run a timer using javascript which get reset on any activity.
The timer will send a ping to ape server at every 40 second and reset
itself. That way APE server will believe you are online. In another
timer you can keep track of the total time elapsed and stop the ping
after 10 minutes.

The server not only closes the connection but also free a lot of
resources. In case you want to close the internet connection, what all
info you want to restore to the user? If you simple wants to join a
channel then you trap BAD_SESSION event and start the APE Client
again.


Cheers!!

On Jul 6, 2:14 pm, hadrienb <[email protected]> wrote:
> Hi everyone !
>
> I'm implementing an application using APE and for that I need to use
> your "Sessions" feature...
> So I followed the tutorial "Using Sessions", which is very clear and
> works perfectly : if the user leave the page and then come back, the
> session is restored, the user gets some custom data stored earlier
> with the SetSession() et GetSession() functions, the multiPipeCreate
> event is fired.. all as expected.
>
> However if the user stay away too long (more than 45sec) and come
> back, the APE JSF try to restore the session but I then get a
> BAD_SESSID error... Which makes the client stop at the core.start()
> function, and the ready event is never fired.
> I checked the documentation and wiki, and previous messages from this
> mailing-list and as I understand it's normal and means that the user
> timed out because he didn't send data to the APE server for too long.
> I also read somewhere that this "session duration" could be modified
> in the ./src/main.h  file.
>
> For my application i need to allow the user to leave it, or be
> disconnected from the internet, for like 10 minutes, and get his
> session back when he comes back.
>
> So my first idea, well the only thing I think I can do is to modify
> this session duration value in the main.h file...
>
> But is this right thing to do ? Maybe there's a better way ?
>
> If someone could confim this and maybe help me to understand it better
> or give me some tips i would be very grateful !
>
> Thanks in advance :)
>
> Hadrien

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to