I want to read UART and web socket asynchronously. When I register the uart object in the uselect.poll then the poll.poll() waits for new uart event and I am able to read uart message successfully. But if I register usocket object in the uselect.poll(), then I am getting EIO error on the poll.poll() line. How to overcome this issue:
I do not get any request data at all (I am sending REST request via PostMan).
If I recreate sockect and bind it in the while loop, then I am getting the request data. But the problem is I can not have more than 1 connection at the same time, but I am listing for 5 connections.
My ultimate goal is to stream video from the camera (how it is done in your MJPEG stream example) and and the same time to be able to receive and send another REST requests and also read UART.