-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
Hi,
I was reading the doc about websocket client :
session = aiohttp.ClientSession()
async with session.ws_connect('http://example.org/websocket') as ws:
async for msg in ws:
if msg.tp == aiohttp.MsgType.text:
if msg.data == 'close cmd':
await ws.close()
break
else:
ws.send_str(msg.data + '/answer')
elif msg.tp == aiohttp.MsgType.closed:
break
elif msg.tp == aiohttp.MsgType.error:
breakBut it seems that async is deprecated now. How to make this code working with python 3.5 ?
Reactions are currently unavailable