Updated example for removed connect() methods
This commit is contained in:
parent
d7ca193625
commit
689f59312f
|
|
@ -1,5 +1,6 @@
|
||||||
package examples;
|
package examples;
|
||||||
|
|
||||||
|
import javax.net.SocketFactory;
|
||||||
import me.legrange.mikrotik.ApiConnection;
|
import me.legrange.mikrotik.ApiConnection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9,7 +10,7 @@ import me.legrange.mikrotik.ApiConnection;
|
||||||
abstract class Example {
|
abstract class Example {
|
||||||
|
|
||||||
protected void connect() throws Exception {
|
protected void connect() throws Exception {
|
||||||
con = ApiConnection.connect(Config.HOST, ApiConnection.DEFAULT_PORT, 2000);
|
con = ApiConnection.connect(SocketFactory.getDefault(), Config.HOST, ApiConnection.DEFAULT_PORT, 2000);
|
||||||
con.login(Config.USERNAME, Config.PASSWORD);
|
con.login(Config.USERNAME, Config.PASSWORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue