I think the key here is to specified the correct transport in the URL. I dont know java but i would suggest using a websocket client if available and the APE websocket transport.
>From the top of my the URL for a websocket connection would look like this: wss://yourAPE.com/6/? For raw HTTP long polling: http://yourAPE.com/0/? The reason why the previous user did not received a CLOSE raw could because the connection was established using the long polling and for this specific transport the client might need to manually close the connection. OR it could be that the check command was sent to a different frequency/subdomain. For example before sending another CHECK command close any existing pending request, although i think APE might close any pending requests if a second request is send to the same frequency. As previously suggested it would be easier to implement the websocket transport since you dont have deal with closing and opening connection. On Apr 30, 2014 5:07 AM, "Marcin Michałek" <[email protected]> wrote: > I know the topic is outdated, but any luck in implementing APE in Java? > I am triyng to do the same for Android, but I am stuck. > > On Tuesday, June 29, 2010 2:46:44 PM UTC+2, stéphane Herraiz wrote: >> >> Hi, >> >> I'm trying to make a APE client in Java (Android). >> >> I'm connecting to the APE server using a CONNECT/JOIN command. >> Then I send a CHECK cmd : >> ["cmd":"CHECK","chl":3,"sessid":"34d2dd64e1bb3d1c17add2b216a87551"}] >> I have put a socket timeout to 30s >> When a message arrive I can read it but I never receive the CLOSE >> raw : [{"time":"1277815119","raw":"CLOSE","data":{"value":"null"}}] >> when no message is coming. I have a timeout. >> What is wrong in my implementation? >> >> Thanks a lot in advance >> >> BR > > -- > -- > 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. > -- -- 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.
