Thanks Luiz, I'll check it out.
   
  ============================
Luiz Filipe <[EMAIL PROTECTED]> wrote:
      Hi Oke.
   
  I´m using the ServiceUtils to call client methods, see:
   
  ServiceUtils.invokeOnClient(IClient clientObject,current 
scope,"methodName",new Object[]{param}, callBackObject);
   
  Regards,
   
  Luiz Filipe.
   
    -----Mensagem original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de oke _
Enviada em: quinta-feira, 25 de janeiro de 2007 20:10
Para: [email protected]
Assunto: [Red5] passing data back to server via client callback function?


Hello all, does anyone have an example of a java code snippet that shows a
complete use of server-to-client callback feature that allows data to be passed
back to the server?

Does the callback object have to be "registered" before it's passed to the 
invoke( ) method of the connection?

I have the following piece of server-side code but it seems that 
resultReceived( )
is never executed:
-----------------------
    // inner class to handle callback fn result from ActionScript
     private class ClientCallback implements IPendingServiceCallback
     {
        private String memberName="";       // initialize to empty string
        
         public void resultReceived(IPendingServiceCall call)
         { 
              memberName=(String)call.getResult();
         }
     }
             :
             :
             :
      // fetch this client's id from client flash obj
      ClientCallback nameInfo = new ClientCallback();
      ((IServiceCapableConnection)current).invoke("getUserName", null, 
nameInfo);
             :
             :

and on the client, the servicing function:

       netconn.getUserName()
       {
             return _global.memberID;
       }
----------------------


Any pointers appreciated.

-Oke.
    
---------------------------------
  Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta._______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org


 
---------------------------------
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to