async with aiohttp.ClientSession() as session:
async with session.ws_connect(url, autoclose=False, autoping=False) as ws: # send request
dispatch_task = asyncio.create_task(dispatch(ws))
# Exit with Ctrl+D while line := await asyncio.to_thread(sys.stdin.readline):
await ws.send_str(name + ": " + line)
dispatch_task.cancel() with suppress(asyncio.CancelledError):
await dispatch_task
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.