app.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:MyIoT 作者: xswxm 项目源码 文件源码
def connect():
    global tokens
    if (request.args.get('token', '') not in tokens):
        disconnect()
        return
    global thread
    if thread is None:
        thread = socketio.start_background_task(target=background_thread)
    # session['thread'] = socketio.start_background_task(background_thread, session['user'])
    # emit('response', {'data': 'Connected'})
    print('Client connected: ', request.sid)


# Disconnect the client and remove device if it has one
# Current: no accessable funtion
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号