2005-10-04 jrandom

* Further reduction in unnecessary streaming packets.
This commit is contained in:
jrandom
2005-10-04 07:36:25 +00:00
committed by zzz
parent 0a1f59940a
commit 4aa65c3bb3
4 changed files with 14 additions and 7 deletions

View File

@ -66,7 +66,7 @@ class HTTPResponseOutputStream extends FilterOutputStream {
if (_headerWritten) { if (_headerWritten) {
out.write(buf, off, len); out.write(buf, off, len);
_dataWritten += len; _dataWritten += len;
out.flush(); //out.flush();
return; return;
} }
@ -82,7 +82,7 @@ class HTTPResponseOutputStream extends FilterOutputStream {
// write out the remaining // write out the remaining
out.write(buf, off+i+1, len-i-1); out.write(buf, off+i+1, len-i-1);
_dataWritten += len-i-1; _dataWritten += len-i-1;
out.flush(); //out.flush();
} }
return; return;
} }
@ -199,6 +199,10 @@ class HTTPResponseOutputStream extends FilterOutputStream {
out.write("\n".getBytes()); // end of the headers out.write("\n".getBytes()); // end of the headers
} }
public void close() throws IOException {
out.close();
}
protected void beginProcessing() throws IOException { protected void beginProcessing() throws IOException {
//out.flush(); //out.flush();
PipedInputStream pi = new PipedInputStream(); PipedInputStream pi = new PipedInputStream();

View File

@ -192,13 +192,13 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
} }
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.INFO))
_log.info(_name + ": Done sending: " + total); _log.info(_name + ": Done sending: " + total);
_out.flush(); //_out.flush();
} catch (IOException ioe) { } catch (IOException ioe) {
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("Error sending", ioe); _log.debug("Error sending", ioe);
} finally { } finally {
if (_in != null) try { _in.close(); } catch (IOException ioe) {}
if (_out != null) try { _out.close(); } catch (IOException ioe) {} if (_out != null) try { _out.close(); } catch (IOException ioe) {}
if (_in != null) try { _in.close(); } catch (IOException ioe) {}
} }
} }
} }

View File

@ -1,4 +1,7 @@
$Id: history.txt,v 1.279 2005/10/03 19:27:35 ragnarok Exp $ $Id: history.txt,v 1.280 2005/10/03 21:05:52 jrandom Exp $
2005-10-04 jrandom
* Further reduction in unnecessary streaming packets.
2005-10-03 jrandom 2005-10-03 jrandom
* Properly reject unroutable IP addresses *cough* * Properly reject unroutable IP addresses *cough*

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
* *
*/ */
public class RouterVersion { public class RouterVersion {
public final static String ID = "$Revision: 1.254 $ $Date: 2005/10/01 14:20:09 $"; public final static String ID = "$Revision: 1.255 $ $Date: 2005/10/03 21:05:52 $";
public final static String VERSION = "0.6.1.1"; public final static String VERSION = "0.6.1.1";
public final static long BUILD = 1; public final static long BUILD = 2;
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);