From 1f488b03b669ee8b4435e342ff00d8b88f43d5fc Mon Sep 17 00:00:00 2001 From: Miguel Grinberg <miguel.grinberg@gmail.com> Date: Sat, 6 Jan 2024 11:45:49 +0000 Subject: [PATCH] Clearer documentation for the `max_http_buffer_size` argument (Fixes #1272) --- src/socketio/async_server.py | 8 +++++--- src/socketio/server.py | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/socketio/async_server.py b/src/socketio/async_server.py index 131a9c0..dc23123 100644 --- a/src/socketio/async_server.py +++ b/src/socketio/async_server.py @@ -65,9 +65,11 @@ class AsyncServer(base_server.BaseServer): :param ping_timeout: The time in seconds that the client waits for the server to respond before disconnecting. The default is 20 seconds. - :param max_http_buffer_size: The maximum size of a message when using the - polling transport. The default is 1,000,000 - bytes. + :param max_http_buffer_size: The maximum size that is accepted for incoming + messages. The default is 1,000,000 bytes. In + spite of its name, the value set in this + argument is enforced for HTTP long-polling and + WebSocket connections. :param allow_upgrades: Whether to allow transport upgrades or not. The default is ``True``. :param http_compression: Whether to compress packages when using the diff --git a/src/socketio/server.py b/src/socketio/server.py index a331b76..c8bcaa3 100644 --- a/src/socketio/server.py +++ b/src/socketio/server.py @@ -74,9 +74,11 @@ class Server(base_server.BaseServer): :param ping_timeout: The time in seconds that the client waits for the server to respond before disconnecting. The default is 20 seconds. - :param max_http_buffer_size: The maximum size of a message when using the - polling transport. The default is 1,000,000 - bytes. + :param max_http_buffer_size: The maximum size that is accepted for incoming + messages. The default is 1,000,000 bytes. In + spite of its name, the value set in this + argument is enforced for HTTP long-polling and + WebSocket connections. :param allow_upgrades: Whether to allow transport upgrades or not. The default is ``True``. :param http_compression: Whether to compress packages when using the