From 84a7f89e83e5be5ba959e5fb5854bd650545d3a5 Mon Sep 17 00:00:00 2001 From: GideonLeGrange Date: Mon, 30 Dec 2013 14:20:13 +0200 Subject: [PATCH] Added TLS example and explained a bit more --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index baadc3c..6ba91cb 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,18 @@ con.execute("/system/reboot"); // execute a command con.disconnect(); // disconnect from router ``` +To open an encrypted (TLS) connection is as simple, assuming the default API-SSL port is used: + +```java +ApiConnection con = ApiConnection.connectTLS("10.0.1.1"); // connect to router +con.login("admin","password"); // log in to router +con.disconnect(); // disconnect from router +``` + +Currently only anonymous TLS is supported, not certificates. + +In following examples the connection, logging and disconnection code will not be repeated. + Reading data ------------