From 65baf06eaecbd4ea89c1973c07cf25d159557c25 Mon Sep 17 00:00:00 2001 From: Naoyuki Kanezawa Date: Sun, 13 Jul 2014 16:23:32 +0900 Subject: [PATCH] update README --- README.md | 20 +++++++++++++++++++- pom.xml | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d1cdc94..a0967e7 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,13 @@ The latest artifact is available on Maven Central. Add the following dependency com.github.nkzawa socket.io-client - 0.1.1 + 0.1.2 ``` +Or to install it manually, please refer dependencies to [pom.xml](https://github.com/nkzawa/socket.io-client.java/blob/master/pom.xml). + ## Usage Socket.IO-client.java has almost the same api and features with the original JS client. You use `IO#socket` to initialize `Socket`: @@ -51,6 +53,7 @@ This Library uses [org.json](http://www.json.org/java/) to parse and compose JSO // Sending an object JSONObject obj = new JSONObject(); obj.put("hello", "server"); +obj.put("binary", new byte[42]); socket.emit("foo", obj); // Receiving an object @@ -81,10 +84,25 @@ socket.emit("foo", "woot", new Ack() { }); ``` +Use custom SSL settings: + +```java +// default SSLContext for all sockets +IO.setDefaultSSLContext(mySSLContext); + +// set as an option +opts = new IO.Options(); +opts.sslContext = mySSLContext; +socket = IO.socket("https://localhost", opts); +``` + See the Javadoc for more details. http://nkzawa.github.io/socket.io-client.java/apidocs/ +## Features +This library supports all of the features the JS client does, including events, options and upgrading transport. Android is fully supported. + ## License MIT diff --git a/pom.xml b/pom.xml index dcf476f..9104935 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ com.github.nkzawa engine.io-client - 0.2.2-SNAPSHOT + 0.2.2 org.json