If the server determines the pace at which the images are sent, how it looks, a style decision on the server makes sense. That most browsers (and even non-browsers) are settling for these days, WebSockets .
The main advantage of WebSockets for most proprietary protocols, in addition to becoming a widespread standard, is that they work on top of HTTP and thus can penetrate (most) proxies and firewalls, etc.
On the server side, you can potentially integrate node.js , which makes WebSockets easy to implement, and comes with many other libraries. It is written in C ++ and extends through C ++ and JavaScript, in which node.js hosts the VM. node.js main function is asynchronous at every level, which makes this default programming style.
But of course, there are other ways to implement WebSockets on the server side, perhaps node.js is more than you need. I implemented the C ++ extension for node.js on Windows and used socket.io to port WebSockets and non-WebSocket for older browsers, and it worked fine for me.
But it was text data. In the case of binary data , socket.io will not do this, so you can check out other libraries that make binary through WebSockets.
source share