I feel you brother :)
During the last week I've searched for the light also. Green connection
light to new scope triggered from server side that is.
Connection.connect( scope ) does the trick but only at roomConnect.
The AppAdapter connect( conn, scope ) fails me.
I was trying to change scopes after a client triggered login action. No
luck. The server debug said that the client conencted to the target room.
But on client nothing. So shared object sync, no onSuccess.
So my final solution was to do auth at roomConnect. It seems that this is
_the_ place to filter users.
The user scope changing ( new room ) is happening on client side. I mean I
can invoke it on a connection from red5 and trigger an event client side
to make the client do a connect. But the client does it in the end.
I really didn't get the roomJoin. Joachim said that join happens only when
first connection from client connects to scope. So until someone points to
some greater good in using roomJoin I skip it. Though currently I have
some SharedObject init code there ( because of some error throwed at
roomConnect ).
Also afaik a connection can be in only 1 sibling scope at a time ( if I
have room1 and room2 in the main app those are siblings ).
There's been a great deal of no feedback on the scope issue. I started
also confident that when AppAdapter, Connection and Scope all have a
connect meth this should be a breeze. I was wrong.
Anyway, maybe someone with more dev experience knows some better answers.
cheers,
cosmin
> OK, I've looked through the archives, and I can't find any good
> definitive answers.
> So, let's get this nailed down once and for all.
> There seems to be some confusion about scopes for quite a few Red5
> users, including me.
>
> I want to be able to take a connected user and change their scope on the
> server-side.
> This would be used, for example, to change chat rooms, etc.
>
> I do NOT want to do this client side by making a new net connection.
> I do NOT want to lose the original connection to the application at any
> point while changing scopes.
>
> Is the correct way to do a IConnection.connect() ?
> Example:
>
> // join a room named roomName
> public boolean joinRoom( IConnection conn, String roomName )
> {
> IScope room = this.getChildScope( roomName );
>
> if ( conn.connect( room ) ) {
> return true;
> }
>
> return false;
> }
>
> Also, is it possible for a client to be connected to two sibling scopes
> at the same time with one connection?
>
> I look forward to anyones' response.
> -Mike
>
>
>
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org