From 4f49431e16ba37412f7764eacfe36b3b93c25156 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 4 May 2012 11:17:42 -0700 Subject: [PATCH] Rename send to emit, similar to how the node/javascript code names it. --- README.md | 2 +- src/com/codebutler/android_websockets/SocketIOClient.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54b898c..dcc3ce9 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ arguments.put("first argument"); JSONObject second = new JSONObject(); second.put("dictionary", true); arguments.put(second) -client.send("hello", arguments); +client.emit("hello", arguments); client.disconnect(); ``` diff --git a/src/com/codebutler/android_websockets/SocketIOClient.java b/src/com/codebutler/android_websockets/SocketIOClient.java index a603907..af461fb 100644 --- a/src/com/codebutler/android_websockets/SocketIOClient.java +++ b/src/com/codebutler/android_websockets/SocketIOClient.java @@ -72,7 +72,7 @@ private static String readToEnd(InputStream input) throws IOException { android.os.Handler mSendHandler; Looper mSendLooper; - public void send(String name, JSONArray args) throws JSONException { + public void emit(String name, JSONArray args) throws JSONException { final JSONObject event = new JSONObject(); event.put("name", name); event.put("args", args);