I am trying to connect my client side javascript to a backend websocket service hosted using socket.io .
I am trying to use the native WebSocket object to connect to the socket.io server like :
new WebSocket("wss://localhost:8080/socket.io/websocket")
But I keep getting :
Connection closed before receiving a handshake response
I have tried connecting using the client side socket.io library just to confirm that the server is up and fine, and this works, but in production I only have the WebSocket object available.
Any ideas?