mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 12:49:55 +01:00
Add transports to DB during startup. #269
This commit is contained in:
@@ -194,10 +194,6 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
||||
|
||||
private class Reader implements TransportConnectionReader {
|
||||
|
||||
public long getMaxLatency() {
|
||||
return ModemPlugin.this.getMaxLatency();
|
||||
}
|
||||
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return modem.getInputStream();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package org.briarproject.plugins.modem;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.plugins.duplex.DuplexPlugin;
|
||||
import org.briarproject.api.plugins.duplex.DuplexPluginCallback;
|
||||
@@ -9,6 +7,8 @@ import org.briarproject.api.plugins.duplex.DuplexPluginFactory;
|
||||
import org.briarproject.api.reliability.ReliabilityLayerFactory;
|
||||
import org.briarproject.util.StringUtils;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
public class ModemPluginFactory implements DuplexPluginFactory {
|
||||
|
||||
private static final int MAX_LATENCY = 30 * 1000; // 30 seconds
|
||||
@@ -26,6 +26,10 @@ public class ModemPluginFactory implements DuplexPluginFactory {
|
||||
return ModemPlugin.ID;
|
||||
}
|
||||
|
||||
public int getMaxLatency() {
|
||||
return MAX_LATENCY;
|
||||
}
|
||||
|
||||
public DuplexPlugin createPlugin(DuplexPluginCallback callback) {
|
||||
// This plugin is not enabled by default
|
||||
String enabled = callback.getSettings().get("enabled");
|
||||
|
||||
Reference in New Issue
Block a user