Skip to content

Commit

Permalink
documentation on user session behavior on disconnections
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jun 29, 2019
1 parent f130746 commit 6b8e667
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ retrieve information in the user session::

For the ``asyncio`` server, these methods are coroutines::


@eio.on('connect')
async def on_connect(sid, environ):
username = authenticate_user(environ)
Expand Down Expand Up @@ -265,6 +264,9 @@ For the ``asyncio`` server, an asynchronous context manager is used::
async with eio.session(sid) as session:
print('message from ', session['username'])

Note: the contents of the user session are destroyed when the client
disconnects.

Disconnecting a Client
----------------------

Expand Down

0 comments on commit 6b8e667

Please sign in to comment.