I know this is a really old thread, but I am intrigued by the use of WebSockets and LabVIEW. Lately I found a library that NI released:
and I found the code to be very similar to yours. I was just curious if you knew about this ... basically this library combines WebSockets and NI's CVT so that CVT tags get pushed out and exposed through Websocket connections. Still have write your own UI web code, tho. There's another package that's fascinating lately: http://labsocket.com/
. This commercial software supposedly "scrapes" your front panel generates a thin-client webpage for you. Haven't tried it but looks promising. Cheers!
That toolset actually consists of a few things.
The second package, cvt web addon, is a LabVIEW web service which uses the CVT and aims to meet the contract required for the tagwebclient. Originally, these packages were combined but we are interested in making a web service which supports the new tag bus library (which is basically CVT on a wire): https://decibel.ni.c.../docs/DOC-36995
Finally, the cvt web addon does have a sample websocket server. However, to the best of my knowledge it currently just supports sending strings back and forth. It is not used to transfer tag data -- standard labview web service functions are used for that.