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

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

2004-12-05 jrandom

    * Fixed some links in the console (thanks ugha!) and the javadoc
      (thanks dinoman!)
    * Fix the stream's passive flush timer (oh, its supposed to work?)
parent 9ce098ee
No related branches found
No related tags found
No related merge requests found
......@@ -66,9 +66,9 @@
I2P will attempt to guess your IP address by having whomever it talks to tell it what
address they think you are. If and only if you have no working TCP connections and you
have not overridden the IP address, your router will believe them. If that doesn't sound
ok to you, thats fine - go to the <a href="/configadvanced.jsp">advanced config</a> page
ok to you, thats fine - go to the <a href="configadvanced.jsp">advanced config</a> page
and add "i2np.tcp.hostname=yourHostname", then go to the
<a href="/configservice.jsp">service</a> page and do a graceful restart. We used to make
<a href="configservice.jsp">service</a> page and do a graceful restart. We used to make
people enter a hostname/IP address on this page, but too many people got it wrong ;)</p>
<p>The other advanced network option has to do with reseeding - you should never need to
......
......@@ -33,7 +33,7 @@ by their binary code license. This product includes software developed by the A
(http://www.apache.org/). </p>
<p>Another application you can see on this webpage is <a href="http://www.i2p.net/i2ptunnel">I2PTunnel</a>
(your <a href="/i2ptunnel/" target="_blank">web interface</a>) - a GPL'ed application written by mihi that
(your <a href="i2ptunnel/" target="_blank">web interface</a>) - a GPL'ed application written by mihi that
lets you tunnel normal TCP/IP traffic over I2P (such as the eepproxy and the irc proxy).</p>
<p>The router by default also includes human's public domain <a href="http://www.i2p.net/sam">SAM</a> bridge,
......
......@@ -150,7 +150,7 @@ public class TestStreamTransfer {
_log.error("Incorrect size read - expected " + payloadSize + " got " + read);
return;
}
_log.info("Received from the stream " + id + ": [" + new String(payload) + "]");
_log.info("\n== Received from the stream " + id + ": [" + new String(payload) + "]");
try { Thread.sleep(5*1000); } catch (InterruptedException ie) {}
/*
// now echo it back
......@@ -217,7 +217,12 @@ public class TestStreamTransfer {
}
try { Thread.sleep(5*1000) ; } catch (InterruptedException ie) {}
req = "STREAM SEND ID=42 SIZE=10\nBlahBlah!!";
_log.info("Sending data");
_log.info("\n** Sending BlahBlah!!");
out.write(req.getBytes());
out.flush();
try { Thread.sleep(5*1000) ; } catch (InterruptedException ie) {}
req = "STREAM SEND ID=42 SIZE=10\nFooBarBaz!";
_log.info("\n** Sending FooBarBaz!");
out.write(req.getBytes());
out.flush();
try { Thread.sleep(20*1000); } catch (InterruptedException ie) {}
......
......@@ -143,13 +143,21 @@ public class MessageOutputStream extends OutputStream {
public void enqueue() {
// no need to be overly worried about duplicates - it would just
// push it further out
if (!_enqueued)
if (!_enqueued) {
SimpleTimer.getInstance().addEvent(_flusher, _passiveFlushDelay);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Enqueueing the flusher for " + _passiveFlushDelay + "ms out");
} else {
if (_log.shouldLog(Log.DEBUG))
_log.debug("NOT enqueing the flusher");
}
_enqueued = true;
}
public void timeReached() {
_enqueued = false;
long timeLeft = (_lastBuffered + _passiveFlushDelay - _context.clock().now());
if (_log.shouldLog(Log.DEBUG))
_log.debug("flusher time reached: left = " + timeLeft);
if (timeLeft > 0)
enqueue();
else
......@@ -160,7 +168,10 @@ public class MessageOutputStream extends OutputStream {
boolean sent = false;
WriteStatus ws = null;
synchronized (_dataLock) {
if ( (_valid > 0) && (_lastBuffered + _passiveFlushDelay > _context.clock().now()) ) {
long flushTime = _lastBuffered + _passiveFlushDelay;
if ( (_valid > 0) && (flushTime < _context.clock().now()) ) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("doFlush() valid = " + _valid);
if ( (_buf != null) && (_dataReceiver != null) ) {
ws = _dataReceiver.writeData(_buf, 0, _valid);
_written += _valid;
......@@ -169,6 +180,9 @@ public class MessageOutputStream extends OutputStream {
_dataLock.notifyAll();
sent = true;
}
} else {
if (_log.shouldLog(Log.DEBUG))
_log.debug("doFlush() rejected... valid = " + _valid);
}
}
// ignore the ws
......
......@@ -27,7 +27,7 @@ but there are three other subpackages that are helpful. Specifically:<ul>
<li>{@link net.i2p.client.streaming} - for applications that want to use
a streaming API to provide reliable in order message delivery (<b>note</b>:
the streaming library is packaged seperate from the main SDK - in the
ministreaming.jar)</li>
mstreaming.jar and streaming.jar)</li>
</ul></p>
<p>The {@link net.i2p.client.I2PSession} implementation itself communicates with
......
$Id: history.txt,v 1.93 2004/12/01 22:20:04 jrandom Exp $
$Id: history.txt,v 1.94 2004/12/04 18:40:53 jrandom Exp $
2004-12-05 jrandom
* Fixed some links in the console (thanks ugha!) and the javadoc
(thanks dinoman!)
* Fix the stream's passive flush timer (oh, its supposed to work?)
2004-12-03 jrandom
* Toss in a small pool of threads (3) to execute the events queued up with
......
......@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.98 $ $Date: 2004/12/01 22:20:03 $";
public final static String ID = "$Revision: 1.99 $ $Date: 2004/12/04 18:40:53 $";
public final static String VERSION = "0.4.2.2";
public final static long BUILD = 2;
public final static long BUILD = 3;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);
......
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