Model.simpleConnect.callServer("changeUserStatus", [id, status]);
and then have a Red5 Handler:
public void changeUserStatus(Object[] params){}
When the handler is called, I get a argument with two items. The first item in params is a org.red5.server.net.rtmp.RTMPMinaConnection
Am I supposed to mark that as my connection?
IConnection conn = params[0];
(yes, I know that won't work as is)
And what about params[1]? It's coming across as a HashMap (is someone obsessed? ;-) -- but what I am sending is one string and one number. When I look at it, the number has been converted to a String, so I have to convert it again... (untested code):
HashMap p = (HashMap)params[1];
Set keys = p.keySet();
Object[] keyObjects = keys.toArray();
Object >String id = (String)p.get(one);
Object two = keyObjects[0];
String statusString = (String)p.get(two);
Integer status = Integer.valueOf(statusString);
Am I doing this all wrong?
Am I getting the proper items through the handler?
Am I handling the params[1] items correctly? Efficiently?
Leif
_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
