Allow client code to detect whether or not the client is connected, since isLoggedOn returns true during the dispatch of CLIENT_DID_LOGOFF. This will allow msoy to prevent the display of room change popups when the client is disconnected.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5790 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -85,6 +85,16 @@ public class Communicator
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Detects if the communicator currently has an open channel to the server. This is guaranteed
|
||||
* to return false while the logoff event is being dispatched. It also returns true during
|
||||
* authentication, but prior to the client appearing to be logged on.
|
||||
*/
|
||||
public function isConnected () :Boolean
|
||||
{
|
||||
return _writer != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to logon on using the port at the specified index.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user