Added non-default port example
This commit is contained in:
parent
ed737c890c
commit
3c55361a25
|
|
@ -30,12 +30,14 @@ If your router does not use the default API port, the port can be specified when
|
||||||
```java
|
```java
|
||||||
ApiConnection con = ApiConnection.connect("10.0.1.1", 1337); // connect to router on port 1337
|
ApiConnection con = ApiConnection.connect("10.0.1.1", 1337); // connect to router on port 1337
|
||||||
con.login("admin","password"); // log in to router
|
con.login("admin","password"); // log in to router
|
||||||
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
To open an encrypted (TLS) connection is as simple, assuming the default API-SSL port is used:
|
To open an encrypted (TLS) connection is as simple, assuming the default API-SSL port is used:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
ApiConnection con = ApiConnection.connectTLS("10.0.1.1"); // connect to router
|
ApiConnection con = ApiConnection.connectTLS("10.0.1.1"); // connect to router
|
||||||
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
Currently only anonymous TLS is supported, not certificates.
|
Currently only anonymous TLS is supported, not certificates.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue