abstract public class Server implements Runnable {
static private final String[] ANON_CIPHERS = getAnonCiphers();
- private Version serverVersion = new Version();
private int port;
private boolean ssl;
private ServerSocket ss;
private Object lock = new Object();
private Object counterLock = new Object();
- public Server(Version version, int port, boolean ssl) throws IOException {
- this.serverVersion = version;
+ @Deprecated
+ public Server(@SuppressWarnings("unused") Version notUsed, int port,
+ boolean ssl) throws IOException {
+ this(port, ssl);
+ }
+
+ public Server(int port, boolean ssl) throws IOException {
this.port = port;
this.ssl = ssl;
this.ss = createSocketServer(port, ssl);
stop(timeout);
} else {
new Thread(new Runnable() {
+ @Override
public void run() {
stop(timeout);
}
}
}
+ @Override
public void run() {
try {
while (started && !exiting) {
} finally {
count(-1);
}
- };
+ }
@Override
protected void onClientVersionReceived(Version clientVersion) {
this.clientVersion = clientVersion;
- };
+ }
}.connectAsync();
}