Skip to content

Commit 858907f

Browse files
docs: add import hints to readme (#586)
1 parent 54b7311 commit 858907f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ Please use the lastest version of socket.io 2.x: [socket.io 2.3.0](https://www.n
5151
Socket.IO-client Java has almost the same api and features with the original JS client. You use `IO#socket` to initialize `Socket`:
5252

5353
```java
54-
socket = IO.socket("http://localhost");
54+
import io.socket.client.IO;
55+
import io.socket.client.Socket;
56+
...
57+
58+
Socket socket = IO.socket("http://localhost");
5559
socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
5660

5761
@Override

0 commit comments

Comments
 (0)