We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6df96fb commit 72dfdc6Copy full SHA for 72dfdc6
docs/server.rst
@@ -448,13 +448,13 @@ The session can also be manipulated with the `session()` context manager::
448
For the ``asyncio`` server, an asynchronous context manager is used::
449
450
@sio.event
451
- def connect(sid, environ):
+ async def connect(sid, environ):
452
username = authenticate_user(environ)
453
async with sio.session(sid) as session:
454
session['username'] = username
455
456
457
- def message(sid, data):
+ async def message(sid, data):
458
459
print('message from ', session['username'])
460
0 commit comments