Help requested regarding Socket.IO usage with protocol: Domoticz? #4715
-
In a react native application I've the following line which is working fine:
What is relevant is the second parameter: ["domoticz"]. Without this parameter I cannot make a successful connection to the Domoticz server. Now I want to use the Socket.IO client because it has the reestablishment option when the connection drops. Question: How to pass the ["domoticz"] paramater in the Socket.IO connection call? If tried many combinations but I cannot get it to work. One of the variations is:
I don't see the connect message in my console! What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Please note that the Socket.IO client is not a WebSocket client, so unless your server is a Socket.IO server, it won't work. You might be interested in https://github.com/nathanboktae/robust-websocket |
Beta Was this translation helpful? Give feedback.
Please note that the Socket.IO client is not a WebSocket client, so unless your server is a Socket.IO server, it won't work.
You might be interested in https://github.com/nathanboktae/robust-websocket
See also: https://socket.io/docs/v4/#what-socketio-is-not