This commit is contained in:
yumoqing 2024-04-28 12:03:52 +08:00
parent eaae1f2819
commit ae6f811d31

View File

@ -150,7 +150,9 @@ class WebsocketProcessor(PythonScriptProcessor):
await ws.prepare(request)
ws_pool = WsPool(ws, request.path, request.app)
# await self.ws_send(ws, 'Welcome to websock')
print(f'{request.path=}')
async for msg in ws:
print(f'{msg=}')
if msg.type == aiohttp.WSMsgType.TEXT:
if msg.data == 'exit':
break