As on the server, provide a means to detect whether we can
transmit datagrams. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5801 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -186,6 +186,12 @@ public class BlockingCommunicator extends Communicator
|
||||
return _lastWrite;
|
||||
}
|
||||
|
||||
@Override // from Communicator
|
||||
public boolean getTransmitDatagrams ()
|
||||
{
|
||||
return _datagramWriter != null;
|
||||
}
|
||||
|
||||
@Override // from Communicator
|
||||
protected synchronized void logonSucceeded (AuthResponseData data)
|
||||
{
|
||||
|
||||
@@ -397,6 +397,14 @@ public class Client
|
||||
return (_comm != null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether we should transmit datagrams.
|
||||
*/
|
||||
public synchronized boolean getTransmitDatagrams ()
|
||||
{
|
||||
return (_comm != null && _comm.getTransmitDatagrams());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if we are logged on, false if we're not.
|
||||
*/
|
||||
|
||||
@@ -76,6 +76,14 @@ public abstract class Communicator
|
||||
return _lastWrite;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether we should transmit datagrams.
|
||||
*/
|
||||
public boolean getTransmitDatagrams ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a note of the time at which we last communicated with the server.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user