You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: connectonion/network/asgi/__init__.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
Dependencies: imports from [asgi/http.py, asgi/websocket.py, time, asyncio] | imported by [network/host/server.py, network/__init__.py] | tested by [tests/network/test_asgi.py]
5
5
Data flow: create_app(route_handlers, storage, trust, blacklist, whitelist, on_startup, on_shutdown) → returns ASGI app callable → uvicorn calls app(scope, receive, send) → handles lifespan for startup/shutdown → routes to handle_http() or handle_websocket() based on scope type
6
6
State/Effects: captures start_time for uptime | runs on_startup/on_shutdown callbacks during lifespan | relay connection runs as async task in same event loop
7
-
Integration: exposes create_app() factory, handle_http(), handle_websocket(), _pump_messages(), CORS_HEADERS, read_body(), send_json(), send_html(), send_text() | raw ASGI (no FastAPI/Starlette) for protocol control | lifespan support for relay connection
7
+
Integration: exposes create_app() factory, handle_http(), handle_websocket(), _pipe_ws_io(), CORS_HEADERS, read_body(), send_json(), send_html(), send_text() | raw ASGI (no FastAPI/Starlette) for protocol control | lifespan support for relay connection
8
8
Performance: minimal overhead (direct ASGI protocol) | async I/O for concurrency | single event loop for HTTP, WebSocket, and relay
9
9
Errors: none (errors handled in http.py/websocket.py)
10
10
ASGI application for HTTP and WebSocket handling.
@@ -18,7 +18,7 @@
18
18
fromtypingimportCallable, Awaitable
19
19
20
20
from .httpimporthandle_http, send_json, send_html, send_text, read_body, CORS_HEADERS
21
-
from .websocketimporthandle_websocket, _pump_messages
21
+
from .websocketimporthandle_websocket, _pipe_ws_io
0 commit comments