You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
451 B
Python

from flask import session
from flask_socketio import emit
from . import socketio
handle = ''
@socketio.on("connect bowl")
def add_bowl(id):
print(f'Client connected! ID: {id}')
emit("add bowl", id, to=handle)
@socketio.on("disconnect bowl")
def add_bowl(id):
print(f'Client disconnected! ID: {id}')
emit("remove bowl", id, to=handle)
@socketio.on("handle")
def add_bowl(id):
handle = id
print('Handle is connected!')