[Red5] Maintain list of members in a chat room
loqi901 at yahoo.com
Tue Nov 13 14:06:42 PST 2007
Yes, this is a java Vector object (though I could have used any Collections object ), and it is *stored in* a shared object on the Red5 server - it's not the SO itself.
You can use the SO to store many different objects - you simply store and retrieve them as "attributes" of the SO. (See code snippet below:)
* this method appends a user's name to the client-side username
* list object on each connected browser
public synchronized void updateClientLists(String szUserName)
IConnection current = Red5.getConnectionLocal();
IScope myScope = current.getScope();
ISharedObject mySO = getSharedObject(myScope, "roomSO");
// now update roomlist shared obj...
Vector<String> usernameVect = (Vector<String>)mySO.getAttribute("UsrList");
// finally, update the SO
// client-side update code goes here (see previous email postings)
Sebastien <virtual.user at gmail.com> wrote:
Ok I made my homework and setup my development environment and read a lot of tutorials for java and red5 ;)
I have small question about the "( 'usernameVect' is a Vector representation of the shared object containing the names):"
What do you mean with "Vector representation of the share object?" The usernameVect is the name of my SO ?
Red5 mailing list
Red5 at osflash.org
Never miss a thing. Make Yahoo your homepage.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Red5