Skip to content
Snippets Groups Projects
Commit a17771a7 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Better comments

parent 08b909b9
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@ def user_data_stream(app, user_id, session_id, foreign=False):
# Gather current values from database.
user = User.query.get(user_id)
user_dict = user.to_dict()
# Send initial values to the user.
# Send initial values to the client.
socketio.emit(init_event, json.dumps(user_dict), room=session_id)
while session_id in connected_sessions:
# Get new values from the database
......@@ -78,7 +78,7 @@ def user_data_stream(app, user_id, session_id, foreign=False):
# Compute JSON patches.
user_patch = jsonpatch.JsonPatch.from_diff(user_dict,
new_user_dict)
# In case there are patches, send them to the user.
# In case there are patches, send them to the client.
if user_patch:
socketio.emit(update_event, user_patch.to_string(),
room=session_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment