[Red5devs] red5 invokes CLient method
Mondain
mondain at gmail.com
Fri Feb 6 15:16:33 PST 2009
The dev list is for developer communications for the most part. The question
you asked should be posted on the user list, but since I have code in my ide
at the moment which is similar i will answer your query.
To make a call on the client (flash player) from the server, you must get
the connection for that client.
IConnection conn = Red5.getConnectionLocal();
ServiceUtils.invokeOnConnection(conn, "myClientMethodName", new Object[]{"a
string parameter"});
To make a call to the server from the client just do this (nc being a
connected NetConnection object):
nc.call("myServerMethodName", null, "a string parameter");
Not sure what examples you looked at but anything that you need to know
should be contained within them.
Paul
On Fri, Feb 6, 2009 at 2:09 PM, tom <tomabroad at gmail.com> wrote:
> HI, iwould like to use:
>
> IServiceCapableConnection service = (IServiceCapableConnection)current;
> service.invoke("userBell", new Object[]{"One", 1}); //where userBell is a
> Client method. based on the red5 demos i can do a lot of stuff with the
> inherited (Net)Cnnection object. Not for me. im using the standard
> NetConnection package and im trying something like this:
>
> m_red5connection.xyz = new function(userBell){}
>
> >> what is the right way here? im lost...
>
> >> i saw the examples with nc.setStatus blahblah , but thats not what i
> want...
>
> thx tom
>
>
>
> _______________________________________________
> Red5devs mailing list
> Red5devs at osflash.org
> http://osflash.org/mailman/listinfo/red5devs_osflash.org
>
>
--
http://gregoire.org/
http://osflash.org/red5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5devs_osflash.org/attachments/20090206/8a395cc9/attachment.html>
More information about the Red5devs
mailing list