You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.
flask-sockets uses gevent, which is premised on the request-response model of HTTP. It perhaps wasn't designed with long running requests in mind.
To send outside of the request context, you can use something like websocket-server. It's possible to do this in a thread alongside an existing flask app. Here's a minimal example:
HI,
I have created the websocket as per the example 👍
I have tested it from a page and it works fine.
My question. How do I use the websocket to send info from another function e.g.
def otherFunction():
do stuff
ws.send("this is an update")
The text was updated successfully, but these errors were encountered: