Closed
Description
Hello!
i am getting this error:
The type io.socket.emitter.Emitter cannot be resolved. It is indirectly referenced from required type io.socket.client.SocketJava(16777563)
on this code:
try {
// Initialize the Socket.IO client
socket = IO.socket("wss://ds.fiskpay.com:42099");
// Handle connection
socket.on(Socket.EVENT_CONNECT, args -> {
System.out.println("Connected to FiskPay server.");
});
// Handle disconnection
socket.on(Socket.EVENT_DISCONNECT, args -> {
System.out.println("Disconnected from FiskPay server.");
});
// Handle custom events (example)
socket.on("customEvent", args -> {
System.out.println("Received custom event: " + args[0]);
});
// Connect to the server
socket.connect();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Failed to connect to FiskPay server", e);
}
Any ideas why this is? Shouldn't the jar include the emitter? Should i build client.io and copy the emit from engine.io, in it?