Hi, everyone.
I used red5 in my project, but I met a invoke problem. help me please.
In my server side, the code is :
1. In the Application.java
ChatUser _user0 = null;
public boolean appConnect(IConnection conn, Object[] params){
IServiceCapableConnection service = (IServiceCapableConnection) conn;
............
// create the current user with name and the connectioin;
_user0 = new ChatUser("name",service);
};
2.In the ChatUser.java
IServiceCapableConnection _cbService = null;
public void someoneNotify()
{
if(_cbService != null)
{
_cbService .invoke("remoteSendMessage", new Object[]{"hello"});
}
}
the problem is : when the client side(flash) has been closed, but the
appDisconnect has not been processed, the invoke function would not return and
the red5 come into dead status, that is ,no more client can connect the red5
server, why? please help me.
I have thought two possible reason.
1.I should check the valid _cbService object before I called it, but how
to do it?
2.I should get the IServiceCapableConnection object when I need use it, but
not use the object stored in the ChatUser, but how to do it?
more reasons or more ways please.
thanks more.
maliqun.china
2007-04-04
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org