2005-10-11 jrandom
* Piggyback the SSU partial ACKs with data packets. This is backwards compatible. * Syndie RSS renderer bugfix, plus now include the full entry instead of just the blurb before the cut.
This commit is contained in:
@ -18,9 +18,11 @@ public class RSSRenderer extends HTMLRenderer {
|
|||||||
super(ctx);
|
super(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final boolean RSS_EXCERPT_ONLY = false;
|
||||||
|
|
||||||
public void render(User user, Archive archive, EntryContainer entry, String urlPrefix, Writer out) throws IOException {
|
public void render(User user, Archive archive, EntryContainer entry, String urlPrefix, Writer out) throws IOException {
|
||||||
if (entry == null) return;
|
if (entry == null) return;
|
||||||
prepare(user, archive, entry, entry.getEntry().getText(), out, true, false);
|
prepare(user, archive, entry, entry.getEntry().getText(), out, RSS_EXCERPT_ONLY, false);
|
||||||
|
|
||||||
out.write(" <item>\n");
|
out.write(" <item>\n");
|
||||||
out.write(" <title>" + sanitizeXML(sanitizeString((String)_headers.get(HEADER_SUBJECT))) + "</title>\n");
|
out.write(" <title>" + sanitizeXML(sanitizeString((String)_headers.get(HEADER_SUBJECT))) + "</title>\n");
|
||||||
@ -28,7 +30,9 @@ public class RSSRenderer extends HTMLRenderer {
|
|||||||
out.write(" <guid isPermalink=\"false\">" + urlPrefix + entry.getURI().toString() + "</guid>\n");
|
out.write(" <guid isPermalink=\"false\">" + urlPrefix + entry.getURI().toString() + "</guid>\n");
|
||||||
out.write(" <pubDate>" + getRFC822Date(entry.getURI().getEntryId()) + "</pubDate>\n");
|
out.write(" <pubDate>" + getRFC822Date(entry.getURI().getEntryId()) + "</pubDate>\n");
|
||||||
PetName pn = user.getPetNameDB().getByLocation(entry.getURI().getKeyHash().toBase64());
|
PetName pn = user.getPetNameDB().getByLocation(entry.getURI().getKeyHash().toBase64());
|
||||||
String author = pn.getName();
|
String author = null;
|
||||||
|
if (pn != null)
|
||||||
|
author = pn.getName();
|
||||||
if (author == null) {
|
if (author == null) {
|
||||||
BlogInfo info = archive.getBlogInfo(entry.getURI());
|
BlogInfo info = archive.getBlogInfo(entry.getURI());
|
||||||
if (info != null)
|
if (info != null)
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
$Id: history.txt,v 1.289 2005/10/10 17:58:19 jrandom Exp $
|
$Id: history.txt,v 1.290 2005/10/11 02:07:40 jrandom Exp $
|
||||||
|
|
||||||
|
2005-10-11 jrandom
|
||||||
|
* Piggyback the SSU partial ACKs with data packets. This is backwards
|
||||||
|
compatible.
|
||||||
|
* Syndie RSS renderer bugfix, plus now include the full entry instead of
|
||||||
|
just the blurb before the cut.
|
||||||
|
|
||||||
2005-10-11 jrandom
|
2005-10-11 jrandom
|
||||||
* Piggyback the SSU explicit ACKs with data packets (partial ACKs aren't
|
* Piggyback the SSU explicit ACKs with data packets (partial ACKs aren't
|
||||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
public class RouterVersion {
|
||||||
public final static String ID = "$Revision: 1.264 $ $Date: 2005/10/10 17:58:18 $";
|
public final static String ID = "$Revision: 1.265 $ $Date: 2005/10/11 02:07:40 $";
|
||||||
public final static String VERSION = "0.6.1.2";
|
public final static String VERSION = "0.6.1.2";
|
||||||
public final static long BUILD = 5;
|
public final static long BUILD = 6;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||||
System.out.println("Router ID: " + RouterVersion.ID);
|
System.out.println("Router ID: " + RouterVersion.ID);
|
||||||
|
@ -62,6 +62,7 @@ public class OutboundMessageFragments {
|
|||||||
_context.statManager().createRateStat("udp.partialACKReceived", "How many fragments were partially ACKed (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
_context.statManager().createRateStat("udp.partialACKReceived", "How many fragments were partially ACKed (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||||
_context.statManager().createRateStat("udp.sendSparse", "How many fragments were partially ACKed and hence not resent (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
_context.statManager().createRateStat("udp.sendSparse", "How many fragments were partially ACKed and hence not resent (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||||
_context.statManager().createRateStat("udp.sendPiggyback", "How many acks were piggybacked on a data packet (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
_context.statManager().createRateStat("udp.sendPiggyback", "How many acks were piggybacked on a data packet (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||||
|
_context.statManager().createRateStat("udp.sendPiggybackPartial", "How many partial acks were piggybacked on a data packet (time == message lifetime)", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||||
_context.statManager().createRateStat("udp.activeDelay", "How often we wait blocking on the active queue", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
_context.statManager().createRateStat("udp.activeDelay", "How often we wait blocking on the active queue", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,7 +358,9 @@ public class OutboundMessageFragments {
|
|||||||
|
|
||||||
// ok, simplest possible thing is to always tack on the bitfields if
|
// ok, simplest possible thing is to always tack on the bitfields if
|
||||||
List msgIds = peer.getCurrentFullACKs();
|
List msgIds = peer.getCurrentFullACKs();
|
||||||
List partialACKBitfields = null; // fill in later...
|
List partialACKBitfields = new ArrayList();
|
||||||
|
peer.fetchPartialACKs(partialACKBitfields);
|
||||||
|
int piggybackedPartialACK = partialACKBitfields.size();
|
||||||
List remaining = new ArrayList(msgIds);
|
List remaining = new ArrayList(msgIds);
|
||||||
int sparseCount = 0;
|
int sparseCount = 0;
|
||||||
UDPPacket rv[] = new UDPPacket[fragments]; //sparse
|
UDPPacket rv[] = new UDPPacket[fragments]; //sparse
|
||||||
@ -383,6 +386,8 @@ public class OutboundMessageFragments {
|
|||||||
_context.statManager().addRateData("udp.sendSparse", sparseCount, state.getLifetime());
|
_context.statManager().addRateData("udp.sendSparse", sparseCount, state.getLifetime());
|
||||||
if (piggybackedAck > 0)
|
if (piggybackedAck > 0)
|
||||||
_context.statManager().addRateData("udp.sendPiggyback", piggybackedAck, state.getLifetime());
|
_context.statManager().addRateData("udp.sendPiggyback", piggybackedAck, state.getLifetime());
|
||||||
|
if (piggybackedPartialACK - partialACKBitfields.size() > 0)
|
||||||
|
_context.statManager().addRateData("udp.sendPiggybackPartial", piggybackedPartialACK - partialACKBitfields.size(), state.getLifetime());
|
||||||
if (_log.shouldLog(Log.INFO))
|
if (_log.shouldLog(Log.INFO))
|
||||||
_log.info("Building packet for " + state + " to " + peer + " with sparse count: " + sparseCount);
|
_log.info("Building packet for " + state + " to " + peer + " with sparse count: " + sparseCount);
|
||||||
peer.packetsTransmitted(fragments - sparseCount);
|
peer.packetsTransmitted(fragments - sparseCount);
|
||||||
|
@ -597,7 +597,7 @@ public class PeerState {
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fetchPartialACKs(List rv) {
|
void fetchPartialACKs(List rv) {
|
||||||
InboundMessageState states[] = null;
|
InboundMessageState states[] = null;
|
||||||
int curState = 0;
|
int curState = 0;
|
||||||
synchronized (_inboundMessages) {
|
synchronized (_inboundMessages) {
|
||||||
|
Reference in New Issue
Block a user