9/16/2010 7:25:09 AM
Title:
red5 sharedobject
hi,
i have a chat application with only 2 users in one room, text chat is done thru red5 and if one client clicks a quit button , i am sending a property thru so.setproperty("quit_value",true), and in sync event if we receive
so.data.quit_value==true then nc.close(). but who ever clicks close button net connection closed their end only, the event is not fired the other end,bcoz bfore coming to other end netconnection getting closed. how to solve.
thanks in advance
nicky
Inder
Points: 2980
Posts:0
9/16/2010 10:07:58 AM
nicky when we set property in a sharedObject then its received on all the clients and self also, because the property is first send to server then broadcasted to all the clients listing to that shared object.
If you have put the connection close code in the sync event then you should not face this prob. because you have set the property only then u have received it , and closing the connection should not effect other users. Have you traced the code on other clients without closing connection at your end ? I mean trace the sync function to see if its firing on other clients or not with and without closing connection.
You can send me your sample application , if you are not able to fix it .
9/17/2010 12:22:56 AM
hi,
thanks for ur reply. the chattting is only between 2 persons. if any one is going to close the netconnection the persons net connection also shud get closed. if i m not using nc.close() its working perfectly. in both application s i gave if(var==true)
nc.close(); } i have some other var in the sync event so before nc.close(), im making var==false. if i dont make it false also , its not working properly. The person who quits the section his connection getting closed, but other person not able to receive the true value. if i dont give nc.close(); and tracing it both r receiviing true value.
finally wat i need is, its 2 seperate applications if one person quits, netconnection shud get closed both the ends.
9/17/2010 2:34:15 AM
can u upload your project files or the sample code to some file sharing site like(http://2shared.com/) so that I can see the problem . It looks quite simple code and as you explained it should work fine. I feel you did some other mistake.
9/17/2010 11:42:51 PM
hi,
problem solved. thanku for ur help.one side im handling thru variable and other side thru some other msg.
nicky