We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a little bug in app.py
@socketio.event def my_room_event(message): session['receive_count'] = session.get('receive_count', 0) + 1 emit('my_response', {'data': message['data'], 'count': session['receive_count']}, to=message['room'])
should be
@socketio.event def my_room_event(message): session['receive_count'] = session.get('receive_count', 0) + 1 emit('my_response', {'data': message['data'], 'count': session['receive_count']}, to=message['room'], broadcast=True)
in order to broadcast the msg to all room users
The text was updated successfully, but these errors were encountered:
4ec2748
The fix was a bit more involved than what you suggested, but it should be working ow. Thanks!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Fix a little bug in app.py
@socketio.event
def my_room_event(message):
session['receive_count'] = session.get('receive_count', 0) + 1
emit('my_response', {'data': message['data'], 'count': session['receive_count']}, to=message['room'])
should be
@socketio.event
def my_room_event(message):
session['receive_count'] = session.get('receive_count', 0) + 1
emit('my_response', {'data': message['data'], 'count': session['receive_count']}, to=message['room'], broadcast=True)
in order to broadcast the msg to all room users
The text was updated successfully, but these errors were encountered: