Closed mrez9 closed 3 years ago
i realized my issue wasn't versions problem, client 1.0.1 works fine with netty server 1.7.19
<dependency>
<groupId>com.corundumstudio.socketio</groupId>
<artifactId>netty-socketio</artifactId>
<version>1.7.19</version>
</dependency>
<dependency>
<groupId>io.socket</groupId>
<artifactId>socket.io-client</artifactId>
<version>1.0.1</version>
</dependency>
my problem was the way of emitting and listening: i can only use String:
server:
server.addEventListener("join", String.class, new DataListener<String>() {
@Override
public void onData(SocketIOClient socketIOClient, String s, AckRequest ackRequest) {
System.out.println("join" + s);
}
});
client:
socket.emit("join", "hello world");
TIP: to passing other object create JsonObject or JsonArray and pass it as string
i want to connect from "socket.io-client-java" to "netty-socketio" to send and receive data. client
server
but socketTCP dosen't connect and no exception throwing
by the way, connecting from same client(version 2.0.1) to socket.io.js(version 4.1.3) is working fine then i know its not from ip or port
i tried this version but still not working: client version 0.9.+ with netty-socket 1.6.6 client version 1.0.1 with netty-socket 1.7.19 client version 1.0.+ with netty-socket 1.7.19 client version 2.0.+ with netty-socket 1.7.19
I really appreciate any help you can provide