forked from I2P_Developers/i2p.i2p
BOB finals
This commit is contained in:
@@ -48,17 +48,17 @@ public class DoCMDS implements Runnable {
|
|||||||
// I need a better way to do versioning, but this will do for now.
|
// I need a better way to do versioning, but this will do for now.
|
||||||
public static final String BMAJ = "00", BMIN = "00", BREV = "10", BEXT = "";
|
public static final String BMAJ = "00", BMIN = "00", BREV = "10", BEXT = "";
|
||||||
public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT;
|
public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT;
|
||||||
private Socket server;
|
private final Socket server;
|
||||||
private Properties props;
|
private final Properties props;
|
||||||
private NamedDB database;
|
private final NamedDB database;
|
||||||
private String line;
|
private String line;
|
||||||
private Destination d;
|
private Destination d;
|
||||||
private ByteArrayOutputStream prikey;
|
private ByteArrayOutputStream prikey;
|
||||||
private boolean dk, ns, ip, op;
|
private boolean dk, ns, ip, op;
|
||||||
private NamedDB nickinfo;
|
private NamedDB nickinfo;
|
||||||
private Logger _log;
|
private final Logger _log;
|
||||||
private AtomicBoolean LIVE;
|
private final AtomicBoolean LIVE;
|
||||||
private AtomicBoolean lock;
|
private final AtomicBoolean lock;
|
||||||
/* database strings */
|
/* database strings */
|
||||||
private static final String P_DEST = "DESTINATION";
|
private static final String P_DEST = "DESTINATION";
|
||||||
private static final String P_INHOST = "INHOST";
|
private static final String P_INHOST = "INHOST";
|
||||||
|
@@ -32,9 +32,9 @@ import net.i2p.util.I2PAppThread;
|
|||||||
public class I2PtoTCP implements Runnable {
|
public class I2PtoTCP implements Runnable {
|
||||||
|
|
||||||
private I2PSocket I2P;
|
private I2PSocket I2P;
|
||||||
private NamedDB info, database;
|
private final NamedDB info, database;
|
||||||
private Socket sock;
|
private Socket sock;
|
||||||
private AtomicBoolean lives;
|
private final AtomicBoolean lives;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@@ -38,18 +38,18 @@ import net.i2p.util.Log;
|
|||||||
*/
|
*/
|
||||||
public class MUXlisten implements Runnable {
|
public class MUXlisten implements Runnable {
|
||||||
|
|
||||||
private NamedDB database, info;
|
private final NamedDB database, info;
|
||||||
private Logger _log;
|
private final Logger _log;
|
||||||
private I2PSocketManager socketManager;
|
private final I2PSocketManager socketManager;
|
||||||
private ByteArrayInputStream prikey;
|
private final ByteArrayInputStream prikey;
|
||||||
private ThreadGroup tg;
|
private ThreadGroup tg;
|
||||||
private String N;
|
private final String N;
|
||||||
private ServerSocket listener = null;
|
private ServerSocket listener;
|
||||||
private int backlog = 50; // should this be more? less?
|
private final int backlog = 50; // should this be more? less?
|
||||||
boolean go_out;
|
private final boolean go_out;
|
||||||
boolean come_in;
|
private final boolean come_in;
|
||||||
private AtomicBoolean lock;
|
private final AtomicBoolean lock;
|
||||||
private AtomicBoolean lives;
|
private final AtomicBoolean lives;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor Will fail if INPORT is occupied.
|
* Constructor Will fail if INPORT is occupied.
|
||||||
@@ -61,16 +61,15 @@ public class MUXlisten implements Runnable {
|
|||||||
* @throws java.io.IOException
|
* @throws java.io.IOException
|
||||||
*/
|
*/
|
||||||
MUXlisten(AtomicBoolean lock, NamedDB database, NamedDB info, Logger _log) throws I2PException, IOException, RuntimeException {
|
MUXlisten(AtomicBoolean lock, NamedDB database, NamedDB info, Logger _log) throws I2PException, IOException, RuntimeException {
|
||||||
|
int port = 0;
|
||||||
|
InetAddress host = null;
|
||||||
|
this.lock = lock;
|
||||||
|
this.tg = null;
|
||||||
|
this.database = database;
|
||||||
|
this.info = info;
|
||||||
|
this._log = _log;
|
||||||
|
lives = new AtomicBoolean(false);
|
||||||
try {
|
try {
|
||||||
int port = 0;
|
|
||||||
InetAddress host = null;
|
|
||||||
this.lock = lock;
|
|
||||||
this.tg = null;
|
|
||||||
this.database = database;
|
|
||||||
this.info = info;
|
|
||||||
this._log = _log;
|
|
||||||
lives = new AtomicBoolean(false);
|
|
||||||
|
|
||||||
this.database.getWriteLock();
|
this.database.getWriteLock();
|
||||||
this.info.getWriteLock();
|
this.info.getWriteLock();
|
||||||
this.info.add("STARTING", Boolean.valueOf(true));
|
this.info.add("STARTING", Boolean.valueOf(true));
|
||||||
|
@@ -27,9 +27,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
*/
|
*/
|
||||||
public class TCPio implements Runnable {
|
public class TCPio implements Runnable {
|
||||||
|
|
||||||
private InputStream Ain;
|
private final InputStream Ain;
|
||||||
private OutputStream Aout;
|
private final OutputStream Aout;
|
||||||
private AtomicBoolean lives;
|
private final AtomicBoolean lives;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@@ -42,10 +42,10 @@ import net.i2p.util.I2PAppThread;
|
|||||||
public class TCPtoI2P implements Runnable {
|
public class TCPtoI2P implements Runnable {
|
||||||
|
|
||||||
private I2PSocket I2P;
|
private I2PSocket I2P;
|
||||||
private NamedDB info, database;
|
private final NamedDB info, database;
|
||||||
private Socket sock;
|
private final Socket sock;
|
||||||
private I2PSocketManager socketManager;
|
private final I2PSocketManager socketManager;
|
||||||
private AtomicBoolean lives;
|
private final AtomicBoolean lives;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
Reference in New Issue
Block a user