I'm using the latest release (1.0).  My onRaw function always receives
empty raw and pipe arguments.  Yet I can confirm that they are
received by looking at the HTTP request headers.  But somewhere in the
APE JS FrameWork, they get dropped.  Can someone help?

I have the following code on the client side:

var client = new APE.Client;
Planio.ape_client = client;

client.load({channel:list_id});

client.addEvent('load', function() {
        log('Your APE client is loaded');

        var opt = {'sendStack': false, 'request': 'stack'};
        client.core.start({'name':user_name+Math.floor(Math.random() *
9999999)},opt);
        client.core.request.stack.send();
});

client.addEvent('ready', function() {
        log('You are connected to APE server. Now you can takeover the
world!');
});

client.addEvent('multiPipeCreate', function(pipe, options) {
        Planio.ape_pipe = pipe;
});

client.onRaw('HASH_DATA', function(raw, pipe) {
        log('raw received: '+JSON.stringify(raw));
});

client.onCmd('SEND_HASH', function(raw, pipe) {
        log('send cmd: '+JSON.stringify(raw));
});

And this on the server:

Ape.registerCmd("SEND_HASH", true, function(params, infos) {
 Ape.log("Received SEND_HASH");

 var pipe = Ape.getPipe(params.pipe);
 if (!$defined(pipe)) return ["4400", "WHERESTHEPIPE"];

 pipe.sendRaw('HASH_DATA', params);
 return 1;
})

-- 
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/

To unsubscribe, reply using "remove me" as the subject.

Reply via email to