From 6454dd014d97b7f24f591318164b323148a69cc0 Mon Sep 17 00:00:00 2001 From: Naoyuki Kanezawa Date: Wed, 2 Apr 2014 21:32:42 +0900 Subject: [PATCH] update README --- README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cc4b9a5..9c9857a 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,26 @@ How to set options: opts = new Socket.Options(); opts.transports = new String[] {WebSocket.NAME}; -socket = new Socket("ws://localhost", opts) { ... }; +socket = new Socket(opts) { ... }; +``` + +Sending and receiving binary data: + +```java +socket = new Socket() { + @Override + public void onopen() { + // send binary data + byte[] data = new byte[42]; + socket.send(data); + } + + @Override + public void onmessage(byte[] data) { + // receive binary data + } + ... +}; ``` ### Extra features only for Java client @@ -98,7 +117,7 @@ http://nkzawa.github.io/engine.io-client.java/apidocs/ ## Features -This library supports all of the features the JS client does, including events, options and upgraging transport. Android is fully supported. +This library supports all of the features the JS client does, including events, options and upgrading transport. Android is fully supported. ## License