Hi,
How should I implement it? I am using MultiPipeCreate and have the
following code. which doesn't work..
client.load();
client.addEvent('load', function() {
client.core.start({'name':''+APE.Config.Achievement.username+'','userid':APE.Config.Achievement.userid});
});
client.addEvent('ready', function(data) {
//Join two channels
client.core.join([APE.Config.Achievement.channel,
APE.Config.Highscore.channel]);
});
//multiPipeCreate event is fired when you join a channel
client.addEvent('multiPipeCreate', function(pipe, options) {
//test if pipe is testChannel
if (pipe.name == APE.Config.Achievement.channel) {
//Attach userJoin event only to pipe testChannel
pipe.addEvent('userJoin', function(user, pipe) {
console.log('New user on pipe ' +
APE.Config.Achievement.channel);
});
} else if( pipe.name == APE.Config.Highscore.channel ) {
}
//if( pipe.name == APE.Config.Achievement.channel ){
pipe.onRaw('achievement', function(data, pipe) {
console.log('data received on pipe', pipe.name, ' message :
', data.msg);
});
//}
});
On 5 July 2012 15:23, RakonDark <[email protected]> wrote:
> Hello RonnieV !!
>
> On 5 July 2012 14:26, RonnieV <[email protected]> wrote:
> > Hi,
> >
> > I am using APE with 2 channels (at least this is what I want).
> >
> > client.core.join(['channel1', 'channel2']);
> >
> > this fire a multiPipeCreate as I can read from the documentation, but how
> > can i catch the OnRaw for each channel?
>
> http://www.ape-project.org/docs/client/pipe/onraw.html
> look the example ,
> at createPipe you set the
> pipe.onRaw('data', function(data, pipe) { ...}
>
> sincerely sheinatz
>
> --
> i cant trust, what i not know
>
> --
> 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 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/