From 598dd7e258c0c1d050456bbad2cd867dfca3df0f Mon Sep 17 00:00:00 2001 From: Sasja Date: Mon, 27 Mar 2023 18:57:29 +0800 Subject: [PATCH] fix docstring typo: client/server mixup (#1163) * fix docstring typo: client/server mixup * fix docstring typo: client/server mixup --- src/socketio/asyncio_client.py | 6 +++--- src/socketio/client.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/socketio/asyncio_client.py b/src/socketio/asyncio_client.py index feb470b5..e68e270f 100644 --- a/src/socketio/asyncio_client.py +++ b/src/socketio/asyncio_client.py @@ -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 @@ -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. @@ -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 diff --git a/src/socketio/client.py b/src/socketio/client.py index 2f8de8ef..2f645334 100644 --- a/src/socketio/client.py +++ b/src/socketio/client.py @@ -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 @@ -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. @@ -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