docs: add import hints to readme (#586)

This commit is contained in:
Ifedapo .A. Olarewaju
2020-12-10 12:16:32 +01:00
committed by GitHub
parent 54b73114d1
commit 858907f9be

View File

@@ -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