I want to print something when a client disconnected, but this isn't working
Javascript client:
socket.on("connect", () => {
socket.on("disconnect", () => {
socket.emit("disconnected", "")
})
})
Python flask :
@socketio.on("disconnected")
def handle_disconnect(room_num):
print(f"user in room {room_num} disconnected")
Aucun commentaire:
Enregistrer un commentaire