Hi,
wich transport method are you using? Long polling or websocket? (for a
java application websocket will be better as it allow you to use full
duplex connection).
If you are using long polling this is what you have to do :
* Open a new connection, keep it open until data comes.
o If you didn't receive data within 30sec, open a new CHECK
request, this will close previous request with CLOSE raw.
o If you receive data, then open a new CHECK request
If you are using websocket it's pretty much the same, instead of opening
/ closing new connection just send CHECK request each 30sec (CHECK
request act like a ping request).
Regards.
On 29/06/2010 14:46, 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
--
Nicolas Trani - Web engineer
Weelya - Improve the web
32 rue du faubourg boutonnet
34090 Montpellier
http://www.weelya.com
http://www.ape-project.org
--
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/