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