Error handling while calling _server.joinRoom()
Posted: 11 Nov 2009, 06:43
Hi,
In my application, the join room procedure consists of sending a add_user message to server and then, after few checks I call _server.joinroom().
i) The AS1 api says that the result of _server.joinroom() is a boolean.
If the process fails and the boolean result is false, will the client get an
onJoinRoomError event or I have to explicitly send the message?
ii) What if an exception occurs when _server.joinroom() is called? I saw
that inside MainLib.as if a true/false value comes, the result is sent but
no result if an exception comes and is caught. Is it possible to catch the
exception inside AS code?
The reason for me asking this is that sometimes the client hangs after I send the add_user request. Although, I am handling the onJoinRoomError event but nothing happens when it hangs.
Thanks,
Rohit
In my application, the join room procedure consists of sending a add_user message to server and then, after few checks I call _server.joinroom().
i) The AS1 api says that the result of _server.joinroom() is a boolean.
If the process fails and the boolean result is false, will the client get an
onJoinRoomError event or I have to explicitly send the message?
ii) What if an exception occurs when _server.joinroom() is called? I saw
that inside MainLib.as if a true/false value comes, the result is sent but
no result if an exception comes and is caught. Is it possible to catch the
exception inside AS code?
The reason for me asking this is that sometimes the client hangs after I send the add_user request. Although, I am handling the onJoinRoomError event but nothing happens when it hangs.
Thanks,
Rohit