Socket.IO integration for Flask applications.
I'm running a Flask server on my local machine and am using it to pull data from a serial port and display it in real time on a webpage with Flask-socketio. I followed the example here and am encountering an interesting behavior. I was able to replicate the results of the example, but when I alter the background_thread function to include reading and parsing data from the serial port, something seems to be blocking the socket from sending the data. My code correctly establishes a socket and opens the connection, and can even emit messages correctly at the beginning of the thread function, but once it hits a time.sleep(5), emitting doesn't work anymore. Here's the original thread function that works (and includes a time.sleep()!):
Facing An Issue in Websockets
1 project | reddit.com/r/learnpython | 9 May 2022
Flask + RabbitMQ + SocketIO - forwarding messages
1 project | reddit.com/r/codehunter | 5 Jan 2022
What do you do when you just can't figure something out?
1 project | reddit.com/r/learnprogramming | 30 Nov 2021
I want to use the flask web socket to display real time data on a webpage. Can someone please help me with this?
2 projects | reddit.com/r/flask | 1 Jul 2021
Show logs in real time in browser
1 project | reddit.com/r/flask | 2 Mar 2021