Skip to content

Commit ebde675

Browse files
committed
Merge branch 'master' of ssh://github.com/koush/AndroidAsync
2 parents 5adb6e0 + 69baf97 commit ebde675

File tree

1 file changed

+8
-50
lines changed

1 file changed

+8
-50
lines changed

README.md

Lines changed: 8 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ But if you're looking for a raw Socket, HTTP(s) client/server, and WebSocket lib
88
is it.
99

1010
#### Features
11-
* Based on NIO. One thread, driven by callbacks. Highly efficient.
11+
* Based on NIO. Single threaded and callback driven.
1212
* All operations return a Future that can be cancelled
1313
* Socket client + socket server
1414
* HTTP client + server
1515
* WebSocket client + server
16-
* Socket.IO client
1716

1817
### Download
1918

@@ -107,7 +106,8 @@ AsyncHttpClient.getDefaultInstance().getFile(url, filename, new AsyncHttpClient.
107106
### Caching is supported too
108107

109108
```java
110-
// arguments are the http client, the directory to store cache files, and the size of the cache in bytes
109+
// arguments are the http client, the directory to store cache files,
110+
// and the size of the cache in bytes
111111
ResponseCacheMiddleware.addCache(AsyncHttpClient.getDefaultInstance(),
112112
getFileStreamPath("asynccache"),
113113
1024 * 1024 * 10);
@@ -164,39 +164,6 @@ AsyncHttpClient.getDefaultInstance().websocket(get, "my-protocol", new WebSocket
164164
```
165165

166166

167-
### AndroidAsync also supports socket.io (version 0.9.x)
168-
169-
```java
170-
SocketIOClient.connect(AsyncHttpClient.getDefaultInstance(), "http://192.168.1.2:3000", new ConnectCallback() {
171-
@Override
172-
public void onConnectCompleted(Exception ex, SocketIOClient client) {
173-
if (ex != null) {
174-
ex.printStackTrace();
175-
return;
176-
}
177-
client.setStringCallback(new StringCallback() {
178-
@Override
179-
public void onString(String string) {
180-
System.out.println(string);
181-
}
182-
});
183-
client.on("someEvent", new EventCallback() {
184-
@Override
185-
public void onEvent(JSONArray argument, Acknowledge acknowledge) {
186-
System.out.println("args: " + arguments.toString());
187-
}
188-
});
189-
client.setJSONCallback(new JSONCallback() {
190-
@Override
191-
public void onJSON(JSONObject json) {
192-
System.out.println("json: " + json.toString());
193-
}
194-
});
195-
}
196-
});
197-
```
198-
199-
200167
### AndroidAsync also let's you create simple HTTP servers:
201168
202169
```java
@@ -221,17 +188,12 @@ server.listen(5000);
221188
222189
```java
223190
AsyncHttpServer httpServer = new AsyncHttpServer();
224-
httpServer.setErrorCallback(new CompletedCallback() {
225-
@Override
226-
public void onCompleted(Exception ex) {
227-
Log.e("WebSocket", "An error occurred", ex);
228-
}
229-
});
230-
httpServer.listen(AsyncServer.getDefault(), port);
231191
232-
httpServer.websocket("/live", new AsyncHttpServer.WebSocketRequestCallback() {
233-
@Override
234-
public void onConnected(final WebSocket webSocket, AsyncHttpServerRequest request) {
192+
httpServer.listen(AsyncServer.getDefault(), port);
193+
194+
httpServer.websocket("/live", new AsyncHttpServer.WebSocketRequestCallback() {
195+
@Override
196+
public void onConnected(final WebSocket webSocket, AsyncHttpServerRequest request) {
235197
_sockets.add(webSocket);
236198
237199
//Use this to clean up any references to your websocket
@@ -296,7 +258,3 @@ client.getString("http://foo.com/hello.txt")
296258
}
297259
});
298260
```
299-
300-
### Note on SSLv3
301-
302-
https://github.com/koush/AndroidAsync/issues/174

0 commit comments

Comments
 (0)