6ffc4d9756
* First attempt at new Websockets implementation based on websockets >= 9.0, with sans-i/o features. Requires more work. * Update sanic/websocket.py Co-authored-by: Adam Hopkins <adam@amhopkins.com> * Update sanic/websocket.py Co-authored-by: Adam Hopkins <adam@amhopkins.com> * Update sanic/websocket.py Co-authored-by: Adam Hopkins <adam@amhopkins.com> * wip, update websockets code to new Sans/IO API * Refactored new websockets impl into own modules Incorporated other suggestions made by team * Another round of work on the new websockets impl * Added websocket_timeout support (matching previous/legacy support) * Lots more comments * Incorporated suggested changes from previous round of review * Changed RuntimeError usage to ServerError * Changed SanicException usage to ServerError * Removed some redundant asserts * Change remaining asserts to ServerErrors * Fixed some timeout handling issues * Fixed websocket.close() handling, and made it more robust * Made auto_close task smarter and more error-resilient * Made fail_connection routine smarter and more error-resilient * Further new websockets impl fixes * Update compatibility with Websockets v10 * Track server connection state in a more precise way * Try to handle the shutdown process more gracefully * Add a new end_connection() helper, to use as an alterative to close() or fail_connection() * Kill the auto-close task and keepalive-timeout task when sanic is shutdown * Deprecate WEBSOCKET_READ_LIMIT and WEBSOCKET_WRITE_LIMIT configs, they are not used in this implementation. * Change a warning message to debug level Remove default values for deprecated websocket parameters * Fix flake8 errors * Fix a couple of missed failing tests * remove websocket bench from examples * Integrate suggestions from code reviews Use Optional[T] instead of union[T,None] Fix mypy type logic errors change "is not None" to truthy checks where appropriate change "is None" to falsy checks were appropriate Add more debug logging when debug mode is on Change to using sanic.logger for debug logging rather than error_logger. * Fix long line lengths of debug messages Add some new debug messages when websocket IO is paused and unpaused for flow control Fix websocket example to use app.static() * remove unused import in websocket example app * re-run isort after Flake8 fixes Co-authored-by: Adam Hopkins <adam@amhopkins.com> Co-authored-by: Adam Hopkins <admhpkns@gmail.com> |
||
---|---|---|
.. | ||
benchmark | ||
certs | ||
fake | ||
performance | ||
static | ||
conftest.py | ||
skip_test_custom_protocol.py | ||
test_app.py | ||
test_asgi.py | ||
test_bad_request.py | ||
test_base.py | ||
test_blueprint_copy.py | ||
test_blueprint_group.py | ||
test_blueprints.py | ||
test_cli.py | ||
test_config.py | ||
test_constants.py | ||
test_cookies.py | ||
test_create_task.py | ||
test_custom_request.py | ||
test_dynamic_routes.py | ||
test_errorpages.py | ||
test_exceptions_handler.py | ||
test_exceptions.py | ||
test_graceful_shutdown.py | ||
test_handler_annotations.py | ||
test_headers.py | ||
test_helpers.py | ||
test_http.py | ||
test_json_encoding.py | ||
test_keep_alive_timeout.py | ||
test_logging.py | ||
test_logo.py | ||
test_middleware.py | ||
test_multiprocessing.py | ||
test_named_routes.py | ||
test_payload_too_large.py | ||
test_pipelining.py | ||
test_redirect.py | ||
test_reloader.py | ||
test_request_cancel.py | ||
test_request_data.py | ||
test_request_stream.py | ||
test_request_timeout.py | ||
test_request.py | ||
test_requests.py | ||
test_response_timeout.py | ||
test_response.py | ||
test_routes.py | ||
test_server_events.py | ||
test_signal_handlers.py | ||
test_signals.py | ||
test_static.py | ||
test_test_client_port.py | ||
test_timeout_logic.py | ||
test_touchup.py | ||
test_unix_socket.py | ||
test_url_building.py | ||
test_url_for_static.py | ||
test_url_for.py | ||
test_utf8.py | ||
test_utils.py | ||
test_versioning.py | ||
test_vhosts.py | ||
test_views.py | ||
test_worker.py |