I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 4b2a734c authored by jrandom's avatar jrandom Committed by zzz
Browse files

* 2004-12-18 0.4.2.4 released

parent 97ae8f78
No related branches found
No related tags found
No related merge requests found
$Id: history.txt,v 1.109 2004/12/16 00:42:04 jrandom Exp $
$Id: history.txt,v 1.110 2004/12/16 05:21:24 jrandom Exp $
* 2004-12-18 0.4.2.4 released
2004-12-16 jrandom
* Catch another oddball case for a reset connection in the streaming lib.
......
......@@ -4,7 +4,7 @@
<info>
<appname>i2p</appname>
<appversion>0.4.2.3</appversion>
<appversion>0.4.2.4</appversion>
<authors>
<author name="I2P" email="support@i2p.net"/>
</authors>
......
......@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.114 $ $Date: 2004/12/16 00:42:04 $";
public final static String VERSION = "0.4.2.3";
public final static long BUILD = 8;
public final static String ID = "$Revision: 1.115 $ $Date: 2004/12/16 05:21:23 $";
public final static String VERSION = "0.4.2.4";
public final static long BUILD = 0;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);
......
......@@ -69,6 +69,7 @@ public class MessageHandler implements I2NPMessageReader.I2NPMessageEventListene
_log.log(level, "Peer " + _identHash.toBase64().substring(0,6) + " is only skewed by ("
+ DataHelper.formatDuration(delta) + ") after uptime of "
+ DataHelper.formatDuration(_con.getLifetime()) );
_con.setOffsetReceived(delta);
}
}
......
......@@ -43,6 +43,7 @@ public class TCPConnection {
private boolean _closed;
private long _lastRead;
private long _lastWrite;
private long _offsetReceived;
public TCPConnection(RouterContext ctx) {
_context = ctx;
......@@ -59,6 +60,7 @@ public class TCPConnection {
_closed = false;
_lastRead = 0;
_lastWrite = 0;
_offsetReceived = 0;
_runner = new ConnectionRunner(_context, this);
_context.statManager().createRateStat("tcp.probabalisticDropQueueSize", "How many bytes were queued to be sent when a message as dropped probabalistically?", "TCP", new long[] { 60*1000l, 10*60*1000l, 60*60*1000l, 24*60*60*1000l } );
_context.statManager().createRateStat("tcp.queueSize", "How many bytes were queued on a connection?", "TCP", new long[] { 60*1000l, 10*60*1000l, 60*60*1000l, 24*60*60*1000l } );
......@@ -81,6 +83,9 @@ public class TCPConnection {
public void setShownAddress(String ip) { _shownAddress = ip; }
/** What address the peer said we are reachable on */
public String getShownAddress() { return _shownAddress; }
/** skew that the other peer has from our clock */
public long getOffsetReceived() { return _offsetReceived; }
public void setOffsetReceived(long ms) { _offsetReceived = ms; }
/**
* Actually start processing the messages on the connection (and reading
......
......@@ -770,6 +770,7 @@ public class TCPTransport extends TransportImpl {
public String renderStatusHTML() {
StringBuffer buf = new StringBuffer(1024);
synchronized (_connectionLock) {
long offsetTotal = 0;
buf.append("<b>Connections (").append(_connectionsByIdent.size()).append("):</b><ul>\n");
for (Iterator iter = _connectionsByIdent.values().iterator(); iter.hasNext(); ) {
TCPConnection con = (TCPConnection)iter.next();
......@@ -782,10 +783,18 @@ public class TCPTransport extends TransportImpl {
buf.append(bps).append("Bps");
else
buf.append((int)(bps/1024)).append("KBps");
buf.append(" with a ").append(con.getOffsetReceived()).append("ms clock offset");
buf.append("</li>\n");
offsetTotal += con.getOffsetReceived();
}
buf.append("</ul>\n");
buf.append("<b>Average clock skew: ");
if (_connectionsByIdent.size() > 0)
buf.append(offsetTotal / _connectionsByIdent.size()).append("ms</b><br />\n");
else
buf.append("n/a</b><br />\n");
buf.append("<b>Connections being built:</b><ul>\n");
for (Iterator iter = _pendingConnectionsByIdent.iterator(); iter.hasNext(); ) {
Hash peer = (Hash)iter.next();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment