Allow callers to detect when a client is about to die even though it is connected and logged on. This allows handling of the edge case where a client is getting throttled.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5897 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Jamie Doornbos
2009-08-05 22:12:16 +00:00
parent 4dc85174ba
commit 5d8a93632e
2 changed files with 30 additions and 7 deletions
@@ -243,6 +243,16 @@ public class Client extends EventDispatcher
return _comm != null && _comm.isConnected();
}
/**
* Detects if we have an external logoff request waiting to go through. If the connection is
* being throttled, this may return true even though the client <code>isLoggedOn() &&
* isConnected()</code>.
*/
public function isLogoffPending () :Boolean
{
return _switcher == null && _comm != null && _comm.hasPendingLogoff();
}
/**
* Requests that this client connect and logon to the server with which it was previously
* configured.