Really,

I was looking at your demos, you sending an inline push and you
receiving the processed data back to you, though i don't know if you
are just coping this data  and setting it in the DOM or are you
listing for the onraw ?

I tried the ajax callback and there is a lag if you are downloading
something and it seems that your a receiving message too late..  o
when processing a image since php need to download first the image to
get dimension that give you a delay and looks like it takes forever
though the ajax callback took merely 450ms ...

any other Idea..

On Aug 27, 1:52 pm, Pablo Tejada <[email protected]> wrote:
> That is the default behavior, in general not only for inlinepush. Server
> automatically restricts the sender from receiving its own message.
>
> http://www.ape-project.org/docs/server/more/pipe.sendraw.html
>
> I think that your best bet is to return the processed message from the ajax
> request to the PHP script.
> On Aug 27, 2012 4:38 PM, "UTAN" <[email protected]> wrote:
>
>
>
>
>
>
>
> > Ok, so I am trying the inline push , I wan to process the message in
> > php and push it to the server and server return it to its intended
> > recipient..
>
> > Now it works fine but i got a problem : ,
>
> > what works fine now is,
>
> > using the send method in client side I would just catch the command
> > send with method onCmd and pass it a copy to the user who sent it,
> > then all users connected will just wait for the message to arrive to
> > them but me, but doesn't matter because i have a copy processed and
> > just place in the text message box...
>
> > It works fine this way but i am trying with inline push,   because I
> > want some implementation on server side and for security reason..
>
> > Now, I push fine the data and return it to the users on the channel o
> > the pipe but here is the problem, the user who sent the data is not
> > receiving the data processed because used pipe.sendRaw and the third
> > parameter   is the user pipe..
>
> > And because to send the data i have used ajax to php I can catch this
> > command or I wouldn't  want to use a callback in ajax to get the
> > processed message from php back to Js.. since will hit performance...
> > send to php -> push to server , then a copy back to user Js..
>
> > see my code, not finished
>
> > Ape.registerCmd('sendMsg', false, function(params, infos) {
> > if(!$defined(params))return ["10", "NO_PARAMS"];
> > if (params.passw == apePassword) {
>
> > //get the channel or user pipe if not channel
> > var channel    = Ape.getChannelByPubid(params.chanpipe) ?
> > Ape.getChannelByPubid(params.chanpipe) :
> > Ape.getUserByPubid(params.chanpipe);
>
> > // if topipe exist is actually a user pipe not channel
> > var topipe     = Ape.getUserByPubid(params.chanpipe);
> > var usernick   = params.usernick;
> > var frompipe   = Ape.getUserByPubid(params.userpipe);
> > var msg        = params.msg;
>
> > if(channel && usernick && msg){
> >         channel.pipe.sendRaw('data' , params ,{'from'    : frompipe.pipe});
> >         // sent an ok was pushed
> >         return {"name":"pushed","data":{"value":"ok"}};
> >         }else{
> >         Ape.log('Either channel or usernick werent defined');
> >         return ["101","USER OR CHANNEL UNDEFINED"];
> > }
> > }else{
> >   Ape.log('Password wanst correct, wich was: '+params.passw);
> > }
> > });
>
> > The user sending the message needs to have the message sent to himself
> > not only to the users in the pipe..
>
> > but I need also to return the user.pipe that sent it to the server..
> > any pointers?
>
> > --
> > 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/

Reply via email to