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

View File

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