We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a987f93 + ec60818 commit 50132bcCopy full SHA for 50132bc
app/socket_handlers.py
@@ -3,6 +3,17 @@
3
4
5
def register_socket_handlers(socketio):
6
+ @socketio.on("connect")
7
+ def on_connect():
8
+ current_app.logger.info(
9
+ f"Socket {request.sid} connected from {request.environ.get('HTTP_ORIGIN')}"
10
+ )
11
+ return True
12
+
13
+ @socketio.on("disconnect")
14
+ def on_disconnect():
15
+ current_app.logger.info(f"Socket {request.sid} disconnected")
16
17
@socketio.on("join")
18
def on_join(data): # noqa: F401
19
room = data.get("room")
0 commit comments