Been busy making web servers running on IoT Pi's.
ie gadgets with browser based control interfaces.
Web Guru's bear with me as I explain it to myself.
For those who don't know webpages are client/server.
Client makes a connection, requests a html webpage, server delivers it and then the connection closes.
In my case Linux/PC browsers and Pi's running picore with busybox-httpd as the server.
This is fine if you want to just serve pages but for real time control it is a bit slow.
The Pi' spend a lot of time updating the html pages and re-serving them.
Each time it has to send a lot of html data.
Websockets are built into the HTML5 standard and most browsers can handle it now.
Instead closing the connection the socket stays opens and data can be passed back and forwards.
If you only want to update a single sensor data, like temperature you can just send a byte or so of data etc.
Now I am not sure if Busybox-httpd can do websockets, this is all new to me.
So I went googling.
Here is a way to use nc and shell scripts -
https://gist.github.com/apk/2414478nc is in busybox as standard.
Then I found this -
http://websocketd.com/Downloaded the Arm binary and wow it just worked.
Er, at least the binary fired up and the -h command worked.
Still further testing to be done but I thought some of you maybe interested in it.
Note: edit the demo count.sh bash script for busybox's ash shell.
Will be interesting to see if it can handle video.
Bela - tcz please, no hurry, the single binary works fine.
Regards
Gavin