2005-11-06 jrandom

* Include SSU establishment failure in the peer profile as a commError,
      as we do for TCP establishment failures.
    * Don't throttle the initial transmission of a message because of ongoing
      retransmissions to a peer, since the initial transmission of a message
      is more valuable than a retransmission (since it has less latency).
    * Cleaned up links to SusiDNS and I2PTunnel (thanks zzz!)
This commit is contained in:
jrandom
2005-11-06 22:25:17 +00:00
committed by zzz
parent 53cf03cec6
commit bd86483204
5 changed files with 33 additions and 9 deletions

View File

@ -16,9 +16,9 @@
<h4>
<a href="susimail/susimail">Susimail</a> |
<a href="susidns/">SusiDNS</a> |
<a href="susidns/index.jsp">SusiDNS</a> |
<a href="syndie/">Syndie</a> |
<a href="i2ptunnel/">I2PTunnel</a> |
<a href="i2ptunnel/index.jsp">I2PTunnel</a> |
<a href="tunnels.jsp">Tunnels</a> |
<a href="profiles.jsp">Profiles</a> |
<a href="netdb.jsp">NetDB</a> |

View File

@ -1,4 +1,12 @@
$Id: history.txt,v 1.314 2005/11/05 06:01:57 dust Exp $
$Id: history.txt,v 1.315 2005/11/05 16:12:57 jrandom Exp $
2005-11-06 jrandom
* Include SSU establishment failure in the peer profile as a commError,
as we do for TCP establishment failures.
* Don't throttle the initial transmission of a message because of ongoing
retransmissions to a peer, since the initial transmission of a message
is more valuable than a retransmission (since it has less latency).
* Cleaned up links to SusiDNS and I2PTunnel (thanks zzz!)
2005-11-05 jrandom
* Include the most recent ACKs with packets, rather than only sending an

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.283 $ $Date: 2005/11/05 06:01:58 $";
public final static String ID = "$Revision: 1.284 $ $Date: 2005/11/05 16:12:59 $";
public final static String VERSION = "0.6.1.4";
public final static long BUILD = 4;
public final static long BUILD = 5;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -10,6 +10,7 @@ import java.util.Map;
import net.i2p.crypto.DHSessionKeyBuilder;
import net.i2p.data.Base64;
import net.i2p.data.Hash;
import net.i2p.data.RouterAddress;
import net.i2p.data.RouterIdentity;
import net.i2p.data.SessionKey;
@ -760,7 +761,9 @@ public class EstablishmentManager {
err = "Took too long to establish remote connection (unknown state)";
}
_context.shitlist().shitlistRouter(outboundState.getRemoteIdentity().calculateHash(), err);
Hash peer = outboundState.getRemoteIdentity().calculateHash();
_context.shitlist().shitlistRouter(peer, err);
_context.profileManager().commErrorOccurred(peer);
} else {
while (true) {
OutNetMessage msg = outboundState.getNextQueuedMessage();

View File

@ -359,6 +359,13 @@ public class OutboundMessageFragments {
* message to a peer while a retransmission is going on.
*/
private static final boolean THROTTLE_RESENDS = true;
/**
* if true, throttle the initial volley of a message if there is a resend in progress.
* if false, always send the first volley, regardless of retransmissions (but keeping in
* mind bw/cwin throttle, etc)
*
*/
private static final boolean THROTTLE_INITIAL_SEND = false;
private boolean locked_shouldSend(OutboundMessageState state, PeerState peer) {
long now = _context.clock().now();
@ -373,17 +380,23 @@ public class OutboundMessageFragments {
}
OutboundMessageState curRetransMsg = (OutboundMessageState)_retransmitters.get(peer);
if ( (curRetransMsg != null) && ( (curRetransMsg.isExpired() || curRetransMsg.isComplete()) ) ) {
_retransmitters.remove(peer);
curRetransMsg = null;
}
if ( (curRetransMsg != null) && (curRetransMsg != state) ) {
// choke it, since there's already another message retransmitting to this
// peer.
_context.statManager().addRateData("udp.blockedRetransmissions", peer.getPacketsRetransmitted(), peer.getPacketsTransmitted());
if ( (state.getMaxSends() <= 0) || (THROTTLE_RESENDS) ) {
if ( (state.getMaxSends() <= 0) && (!THROTTLE_INITIAL_SEND) ) {
if (state.getMessage() != null)
state.getMessage().timestamp("another message is retransmitting, but we want to send our first volley...");
} else if ( (state.getMaxSends() <= 0) || (THROTTLE_RESENDS) ) {
if (state.getMessage() != null)
state.getMessage().timestamp("choked, with another message retransmitting");
return false;
} else {
if (curRetransMsg.isExpired() || curRetransMsg.isComplete())
_retransmitters.remove(peer);
if (state.getMessage() != null)
state.getMessage().timestamp("another message is retransmitting, but since we've already begun sending...");
}