I didn't understand what do you said... :/
When I send my request APE is properly started and the page too.

The problem is that I've a request for check (cmd check) the APE server 
every 25 second and I've a request sending by a pipe that I use every 800ms.
But when I send my request, the check request is started before it and the 
server break this request for send my request, so i've 2 request every 
800ms... :/

I just want know how can i do (if it's possible) for have the 2 request in 
asynchronous 
: one every 25 second which is only break if the server have news and not 
when i send a request, and my request.

(+ I never set a timer in my code... :/)

Le jeudi 19 juillet 2012 03:25:42 UTC+2, Mitch Stewart a écrit :
>
>  Without the section of code that initializes the APE client and 
> where/when in your code that you setup the timer to send the command to the 
> APE server I can't really say what the problem could be, however, it does 
> sound like you are sending the command to the APE server before the page is 
> loaded and the APE client is connected properly.   Below I show similar 
> code that I use (note: I use my own session handling).  
>
> $(document).ready(function()
> {
> ... 
> create and load APE client here 
> ...
> var APE_SERVER = 0;
>
> var client = new APE.Client();
>
> client.load({'channel': "pgcmd"}); // load the ciient and join command 
> channel
>
> client.addEvent('load', function() {
>              client.core.start({'name': CUID});  // fire up APE client
> });
>  
> client.addEvent('ready', function() {
>         //
>         // join additional channels...
>         //
>         client.core.join(["pgreload","pgupdate", "pgtimer"]);
> });
>
> //
> // initialize our display info and send commands to APE after the pipe is 
> created
> //
> client.addEvent('multiPipeCreate', function(pipe) {
>     
>   APE_SERVER = 1; // track APE server connects here
>
>   // console.log('New pipe created '+pipe.name);
>
>   pipe.request.send('ReloadPage',  {'user':CUID}) }; // send page reload 
> command to APE server
>
>   timer1 = setInterval( "SendServerCMD('UPDATE')", 15000 ); // update the 
> display every 15 seconds
> });
>
>             
> //
> // keep track of server disconnects so we don't try to send commands to a 
> missing server
> //
> client.addEvent('apeDisconnect', function(pipe) {
>
>   // console.log('Lost connection to server');
>
>   APE_SERVER = 0; 
>
>   clearInterval(timer1);
> });
>
> client.addEvent('apeReconnect', function(pipe) {
>                 
>   // console.log('reconnected to server');
>   window.location = URL; // reload the whole page (I got lazy, lol)
> });
>
> });
>
>
>
>
>
>
> On 07/18/2012 11:39 AM, Auryn wrote:
>  
> Hi everybody ! :) 
>
>  So I've an application where i send a request (with pipe.request) every 
> 800 ms, and i've a little problem.
> When I send the request, the check request are breaking and after 2 
> request are sending one for my request and one for check wich is instantly 
> breaking by my next request :
> Exemple of the check request : 
> [{"cmd":"CHECK","chl":13,"sessid":"....................................................................."}]:
>
>  Too many request are sending, so it work but i've sometimes the errors 
> "BAD_CHL" or "BAD_SESSION".
>
>  It's possible to not break the check request when I send a request ? :o 
> (Like have 2 requests in the same time, one for send my request and one for 
> check)
> Else what can I do ?
>
>  (Anyone says me that's the last version of APE solves the BAD_CHL's 
> problem but I can't upgrade my APE for the moment cause my hoster is in 
> holiday. :/)
>
>  Thanks very much ! ^^
>
>  P.S : Sorry for my bad english i'm french... :(
> -- 
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-project@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project+unsubscr...@googlegroups.com
> 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 post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.com
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