Skip to content

Commit

Permalink
fix docstring typo: client/server mixup (#1163)
Browse files Browse the repository at this point in the history
* fix docstring typo: client/server mixup

* fix docstring typo: client/server mixup
  • Loading branch information
Sasja authored Mar 27, 2023
1 parent 9d02247 commit 598dd7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/socketio/asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async def wait(self):
break

async def emit(self, event, data=None, namespace=None, callback=None):
"""Emit a custom event to one or more connected clients.
"""Emit a custom event to the server.
:param event: The event name. It can be any string. The event names
``'connect'``, ``'message'`` and ``'disconnect'`` are
Expand Down Expand Up @@ -229,7 +229,7 @@ async def emit(self, event, data=None, namespace=None, callback=None):
packet.EVENT, namespace=namespace, data=[event] + data, id=id))

async def send(self, data, namespace=None, callback=None):
"""Send a message to one or more connected clients.
"""Send a message to the server.
This function emits an event with the name ``'message'``. Use
:func:`emit` to issue custom event names.
Expand All @@ -252,7 +252,7 @@ async def send(self, data, namespace=None, callback=None):
callback=callback)

async def call(self, event, data=None, namespace=None, timeout=60):
"""Emit a custom event to a client and wait for the response.
"""Emit a custom event to the server and wait for the response.
This method issues an emit with a callback and waits for the callback
to be invoked before returning. If the callback isn't invoked before
Expand Down
6 changes: 3 additions & 3 deletions src/socketio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def wait(self):
break

def emit(self, event, data=None, namespace=None, callback=None):
"""Emit a custom event to one or more connected clients.
"""Emit a custom event to the server.
:param event: The event name. It can be any string. The event names
``'connect'``, ``'message'`` and ``'disconnect'`` are
Expand Down Expand Up @@ -409,7 +409,7 @@ def emit(self, event, data=None, namespace=None, callback=None):
data=[event] + data, id=id))

def send(self, data, namespace=None, callback=None):
"""Send a message to one or more connected clients.
"""Send a message to the server.
This function emits an event with the name ``'message'``. Use
:func:`emit` to issue custom event names.
Expand All @@ -430,7 +430,7 @@ def send(self, data, namespace=None, callback=None):
callback=callback)

def call(self, event, data=None, namespace=None, timeout=60):
"""Emit a custom event to a client and wait for the response.
"""Emit a custom event to the server and wait for the response.
This method issues an emit with a callback and waits for the callback
to be invoked before returning. If the callback isn't invoked before
Expand Down

0 comments on commit 598dd7e

Please sign in to comment.