Python Flask Socketio Broadcasting Outside Of @socketio Context
I'm trying to send a broadcast when an outside value changes. Camonitor calls the callback when the value changes, and I want to notify all connected clients that the value has cha
Solution 1:
Yes, this is a known issue, but it has a very simple workaround:
def update_image_data(pvname, value, **kw):
# broadcast event
print "Sending broadcast"
with app.app_context():
socketio.emit('newimage')
Post a Comment for "Python Flask Socketio Broadcasting Outside Of @socketio Context"