bugfix
This commit is contained in:
parent
6b1aece29e
commit
226c3fbb37
@ -6,10 +6,10 @@
|
||||
# 发送消息给客户端,当id为空时,发送给当前链接的客户端,否则发送给id指定的客户端
|
||||
# is_online(id)
|
||||
# 检查id指定的客户端是否在线
|
||||
# user = await get_user()
|
||||
# ws_pool.register(user)
|
||||
resp = 'resp=' + ws_data
|
||||
user = await get_user()
|
||||
ws_pool.register(user)
|
||||
print(f'{resp=}, {user=}')
|
||||
print(f'{resp=}')
|
||||
await ws_pool.sendto(resp)
|
||||
if ws_pool.is_online('bington'):
|
||||
await ws_pool.sendto(resp, 'bington')
|
||||
# if ws_pool.is_online('bington'):
|
||||
# await ws_pool.sendto(resp, 'bington')
|
||||
|
@ -3,6 +3,6 @@
|
||||
"options":{
|
||||
"width":"100%",
|
||||
"height":"100%",
|
||||
"ws_url":"{{entire_url('echo.ws')}}"
|
||||
"ws_url":"ws://localhost/bricks/examples/echo.ws"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user