docs: add import hints to readme (#586)
This commit is contained in:
committed by
GitHub
parent
54b73114d1
commit
858907f9be
@@ -51,7 +51,11 @@ Please use the lastest version of socket.io 2.x: [socket.io 2.3.0](https://www.n
|
|||||||
Socket.IO-client Java has almost the same api and features with the original JS client. You use `IO#socket` to initialize `Socket`:
|
Socket.IO-client Java has almost the same api and features with the original JS client. You use `IO#socket` to initialize `Socket`:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
socket = IO.socket("http://localhost");
|
import io.socket.client.IO;
|
||||||
|
import io.socket.client.Socket;
|
||||||
|
...
|
||||||
|
|
||||||
|
Socket socket = IO.socket("http://localhost");
|
||||||
socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
|
socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user