2004-11-16 jrandom

* Clean up the propogation of i2psocket options so that various streaming
      libs can honor them more precisely
This commit is contained in:
jrandom
2004-11-16 22:11:11 +00:00
committed by zzz
parent 4a4f57d6ac
commit d943b4993a
9 changed files with 171 additions and 81 deletions

View File

@@ -77,7 +77,7 @@ public class I2PSocketManagerImpl implements I2PSocketManager, I2PSessionListene
_outSockets = new HashMap(16);
_acceptTimeout = ACCEPT_TIMEOUT_DEFAULT;
setSession(session);
setDefaultOptions(new I2PSocketOptions());
setDefaultOptions(buildOptions(opts));
_context.statManager().createRateStat("streaming.lifetime", "How long before the socket is closed?", "streaming", new long[] { 10*60*1000, 60*60*1000, 24*60*60*1000 });
_context.statManager().createRateStat("streaming.sent", "How many bytes are sent in the stream?", "streaming", new long[] { 10*60*1000, 60*60*1000, 24*60*60*1000 });
_context.statManager().createRateStat("streaming.received", "How many bytes are received in the stream?", "streaming", new long[] { 10*60*1000, 60*60*1000, 24*60*60*1000 });
@@ -433,6 +433,11 @@ public class I2PSocketManagerImpl implements I2PSocketManager, I2PSessionListene
public I2PSocketOptions getDefaultOptions() {
return _defaultOptions;
}
public I2PSocketOptions buildOptions() { return buildOptions(null); }
public I2PSocketOptions buildOptions(Properties opts) {
return new I2PSocketOptionsImpl(opts);
}
public I2PServerSocket getServerSocket() {
if (_serverSocket == null) {