I have an existing website that uses sock.js and can connect and send/retrieve messages to and from a websocket server written in Java. I am rewriting the client in Next.js and need to use something like socket.io. I'm just getting message WebSocket connection to 'xxx' failed:
Can socket.io-client connect to a server that is not written in socket.io? Ive gotten the socket.io-client call to be exact same as the sock.js call in the netwrok tab in chrome so I cannot see any differences. I dont get any futher information from the error when debugging.
Is there a better library I can use client side besides socket.io-client. I dont want to go back to sock.js as it doesnt import nicely like other npm packages.
Most of the documentation I find on socket.io-client assumes a socket.io server.
Any help appreciated.