2004-12-06 jrandom

* Don't do a 'passive flush' while there are already outbound messages
      unacked.
    * Show the reseed link if up to 10 peers profiles are active (thanks
      dburton!)
This commit is contained in:
jrandom
2004-12-07 01:35:53 +00:00
committed by zzz
parent fa12dc867f
commit e601cedbb8
2 changed files with 5 additions and 0 deletions

View File

@@ -26,6 +26,10 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver {
_dummyStatus = new DummyStatus(); _dummyStatus = new DummyStatus();
} }
public boolean writeInProcess() {
return _connection.getUnackedPacketsSent() > 0;
}
/** /**
* Send some data through the connection, or if there is no new data, this * Send some data through the connection, or if there is no new data, this
* may generate a packet with a plain ACK/NACK or CLOSE, or nothing whatsoever * may generate a packet with a plain ACK/NACK or CLOSE, or nothing whatsoever

View File

@@ -57,6 +57,7 @@ public class MessageOutputStreamTest {
_data.write(buf, off, size); _data.write(buf, off, size);
return new DummyWriteStatus(); return new DummyWriteStatus();
} }
public boolean writeInProcess() { return false; }
public byte[] getData() { return _data.toByteArray(); } public byte[] getData() { return _data.toByteArray(); }
} }