I forgot, here is the Ape Log PING info ip 84.228.81.96 PONG info ip 84.228.81.96 user bj ../scripts/commands/commands.js:17:TypeError: param.info.sendResponse is not a function
On 15 nov, 11:14, Léo SEI <[email protected]> wrote: > Hey, > > I have an issu with the sendResponse because I use 2 APE client. One > is the control client and the other is the execution client. > Basically this is a triangle where I send command from the control > client that transmit the raw to the execution client. > > I would like to use the sendResponse function to know when the command > has been received on the execution Client. > This is not a version problem because when I use sendResponse in the > registerCmd sent by the control client I receive the response. > > but I'd like to use this sendReponse on the command sent by the > execution client when he receives the raw of command from the control > client, because the control client might be any interface on the web > just using the HTTP request and receiving the confirmation in the HTTP > answer. > > I try to pass the info object along with the raw to be able to use the > sendResponse but I get an :TypeError: param.info.sendResponse is not a > function Error. > > I test on the info object at every stage and this is the same object > so I don't understand :-S > > I don't know if It's clear but here is the Server side script > associated : > > //receive the control Client command > Ape.registerCmd("PING",true,function(param,info){ > Ape.log("PING"); > Ape.log("info ip "+info.ip); > > //send the Raw to the execution client with the info object > Ape.getPipe(param.pipe).sendRaw("PING_DATA",{'info' : info}); > > }); > > //receive the execution client command with the info object as > parameters > Ape.registerCmd("PONG",true,function(param,cmd){ > Ape.log("PONG"); > Ape.log("info ip "+param.info.ip); > Ape.log("user "+cmd.user.getProperty('name')); > > //send the response to the execution client > param.info.sendResponse("PONG2",{"test":"2"}); > Ape.log("send answer"); > > }); > > HERE is the execution part > > this.client.onRaw("PING_DATA", function(raw, pipe){ > alert("got PING"); > alert(raw.data.info); > ApeJs.client.core.request.send("PONG",{'info' : > raw.data.info}); > }); > > thanks a lot > Léo -- 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/
