Browse Source

fix typo with quotes in doc (#238)

pull/241/head
Julien Deniau 6 years ago
committed by Miguel Grinberg
parent
commit
a5a67120fe
  1. 6
      docs/client.rst

6
docs/client.rst

@ -45,7 +45,7 @@ functions must be defined using the ``on`` decorator::
@sio.on('connect') @sio.on('connect')
def on_connect(): def on_connect():
print('I'm connected!') print('I\'m connected!')
@sio.on('message') @sio.on('message')
def on_message(data): def on_message(data):
@ -57,7 +57,7 @@ functions must be defined using the ``on`` decorator::
@sio.on('disconnect') @sio.on('disconnect')
def on_disconnect(): def on_disconnect():
print('I'm disconnected!') print('I\'m disconnected!')
For the ``asyncio`` server, event handlers can be regular functions as above, For the ``asyncio`` server, event handlers can be regular functions as above,
or can also be coroutines:: or can also be coroutines::
@ -162,7 +162,7 @@ added to the ``on`` decorator::
@sio.on('connect', namespace='/chat') @sio.on('connect', namespace='/chat')
def on_connect(): def on_connect():
print('I'm connected to the /chat namespace!') print('I\'m connected to the /chat namespace!')
Likewise, the client can emit an event to the server on a namespace by Likewise, the client can emit an event to the server on a namespace by
providing its in the ``emit()`` call:: providing its in the ``emit()`` call::

Loading…
Cancel
Save