Hi Pablo, I can see that APE disconnects players after 45 seconds. Actually, my players lose their current game when this happens. I suspect this is what you are talking about when saying APE prunes sessions and sockets. So what I am interested in is the period between 10-20 seconds and 45 seconds. I manage to reconnect in the first 10 seconds, but not later.
Other than that, I have a few questions. 1) Does the event apeDisconnect work? I have tried quickly yesterday evening, but it did not seem to be raised ever. 2) I told you I receive duplicated (4-5 times actually) raws from the server after calling this.core.initialize(). Are there really several communication channels open at that time? Are there duplicates on the client or on the server? How can I see where the duplication takes place? In the APE client, I can't seem to see related to that when I go through the hierarchy of the object. If I could find these duplicates, maybe I could just delete the old ones and go on from there. 3) I use Websockets at the moment. Do you think the default mode instead would behave differently? Nicolas. On Wednesday, June 22, 2016 at 4:52:46 AM UTC+2, Pablo wrote: > > Hey again, > > Do note that user sessions and sockets are pruned from the APE server > automatically. So probably when you attempt to reconnect the session has > already been expired. When I built ApePubSub > <https://github.com/ptejada/ApePubSub> a few years ago i remember I had > to create a custom server command to handle restoring the session. From > what I can remember the first command that requires a session will > automatically attempt to resume the session. On success, an IDENT and > LOGIN raw will be received in the client. > > On Tue, Jun 21, 2016 at 6:12 PM Nicolas <[email protected] <javascript:>> > wrote: > >> Hi all, >> >> I store every command and if they have not been acknowldedged by the >> server, I resend them. >> >> In my latest tests, I use a program called Clumsy to simulate Internet >> connection issues. >> >> If connection is cut for a short period, everything falls back into place >> nicely and I thought that everything was working great! >> >> However, if I cut connection for longer than 10-20 seconds (I am not sure >> how long exactly), I just realized that the system does not get back on >> track. The connection seems to be broken for good. >> >> *So my question is simple: what is the correct way to handle the problem? >> How do I reset a connection to APE (with session) without refreshing the >> page (I can't)?* >> >> I have looked at this.reset() which may be the appropriate way. But it >> does not work for me as on the server I don't accept two sessions for the >> same user on the server. >> >> Also I have called this.core.initialize(this.core.options); >> But then I end up receiving duplicated command, probably exactly like if >> I had several tabs open. >> >> *So in short, I can't find the proper way to start with a new fresh >> connection to the server, with the same session without refreshing the >> page. Surely there must be a way.* >> >> Thanks for helping! >> >> -- >> -- >> 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] >> <javascript:> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> 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/ >> >> --- >> You received this message because you are subscribed to the Google Groups >> "APE Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- > > Sincerely, > > Pablo Tejada > > From Mobile > -- -- 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/ --- You received this message because you are subscribed to the Google Groups "APE Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
