Six years ago, (used ws version 0.4.32 now we use 7.2.1 ), I had a great little websocket that ran on http://repl.it and connected a Particle Photon to a webpage with very fast interaction < 10 ms per command. I need to now update my code for Arduinos new github here. The problem is that I don't know what the Arduino should reply to the node websocket to complete the connection. Any suggestions?
This used to work. (Note: I would randomly generate the Sec-WebSocket-Key)
client.println("GET / HTTP/1.1");
client.println("Host: myURL");
client.println("Upgrade: websocket");
client.println("Connection: Upgrade");
client.println("Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==");
client.println("Sec-WebSocket-Version: 13");
client.println();
I am now running my up-to-date index.js on Gitpod.io Everything works, but I am confused with what the Arduino should send to the websocket to start the connection. Does anyone have any ideas?