-->
Page 1 of 1

Looking for an example on data streaming via HTTP&JavaScript

PostPosted: Thu Mar 22, 2018 11:25 pm
by skettlitz
Consider an ESP8266 that collects sensor data and wants to stream it live via HTTP to a browser running a JavaScript client. The server shall send more data every few milliseconds to the client. While the stream is running the ESP shall still serve other pages via HTTP.

I can do everything sequentially on the ESP8266. E.g. serve a page OR send endless data over HTTP. I did not find an example on how to do both "in parallel". Is there an example that does this or one I can adapt?

This use case should be similar to "upload big file" while still serving other pages.

How can I keep one HTTP connection open while still serving other HTTP requests?

How many HTTP requests can be served in parallel?

Re: Looking for an example on data streaming via HTTP&JavaSc

PostPosted: Fri Mar 23, 2018 12:43 am
by Pablo2048
Look after ESPAsyncWebServer - can handle multiple clients @ time and contain websocket server for fast data transfer.

Re: Looking for an example on data streaming via HTTP&JavaSc

PostPosted: Wed Mar 28, 2018 6:33 am
by skettlitz
This looks very promising. Thanks!