Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.socket.emitter not found inside .jar #777

Open
FiskPay opened this issue Jan 16, 2025 · 0 comments
Open

io.socket.emitter not found inside .jar #777

FiskPay opened this issue Jan 16, 2025 · 0 comments
Labels

Comments

@FiskPay
Copy link

FiskPay commented Jan 16, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant