Websocket client not connecting to the socket.io server #4299
-
I have a basic socket.io server (version 4.4.1) to which I am trying to connect with a C++ websocket client. I have even tried from Postman client using Raw Websocket client too. It shows the same behaviours with EIO=3 and EIO=4. Any pointers on what extra needs to be done on the client or server side to resolve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
So after debugging a lot I was able to figure this out. This needs to be in the migration documentation along with the reversal of ping/pong messages. |
Beta Was this translation helpful? Give feedback.
So after debugging a lot I was able to figure this out.
The issue is that when using EIO v3 the server sends the CONNECT message packet. However, for EIO v4, the client has to send the CONNECT message packet.
CONNECT message packet is identified by text 40 where,
4 => engine.io packet type MESSAGE
0 => socket.io packet type CONNECT
This needs to be in the migration documentation along with the reversal of ping/pong messages.