Sunday, June 14, 2020

websocket musings

https://websocket.org/quantum.html  (about the advantages of websockets)
https://socket.io/get-started/chat/ (getting started with websockets)

After much belaboring, you cannot use socket.io with a websockets server. I suppose you could use it with  socket.io server if you wanted?

This means that the server in this example will not work with my websockets client on the esp32:
https://www.youtube.com/watch?v=rxzOqP9YwmM
(Build a Real Time Chat App With Node.js And Socket.io)
See :
https://socket.io/docs/#What-Socket-IO-is-not

For a websockets server, check out:


https://medium.com/hackernoon/implementing-a-websocket-server-with-node-js-d9b78ec5ffa8

which gives a great reference:
https://www.ably.io/concepts/websockets

+ establish http connection (handshake?)
+ upgrade to websocket connection
 + keep opne



No comments:

Post a Comment