mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
added optional SSL encryption
This commit is contained in:
parent
a168d53966
commit
b41cbe2703
11 changed files with 55 additions and 13 deletions
|
|
@ -699,7 +699,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
|
||||
public boolean connect(Connection connection) {
|
||||
client = new Client(instance);
|
||||
boolean result = client.connect(connection.getUsername(), connection.getHost(), connection.getPort(), version);
|
||||
boolean result = client.connect(connection.getUsername(), connection.getHost(), connection.getPort(), true, version);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class MultiConnectTest {
|
|||
connection.setPort(17171);
|
||||
connection.setProxyType(Connection.ProxyType.NONE);
|
||||
|
||||
client.connect(username, "localhost", 17171, version);
|
||||
client.connect(username, "localhost", 17171, true, version);
|
||||
}
|
||||
|
||||
public MageVersion getVersion() {
|
||||
|
|
@ -75,6 +75,7 @@ public class MultiConnectTest {
|
|||
connected++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnected(boolean errorCall) {
|
||||
logger.info("disconnected");
|
||||
}
|
||||
|
|
@ -158,8 +159,8 @@ public class MultiConnectTest {
|
|||
private void sleep(int ms) {
|
||||
try {
|
||||
Thread.sleep(ms);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} catch (InterruptedException e) {
|
||||
logger.error("Error", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue