MCPcopy
hub / github.com/encode/uvicorn / ServerState

Class ServerState

uvicorn/server.py:44–53  ·  uvicorn/server.py::ServerState

Shared servers state that is available between all protocol instances.

Source from the content-addressed store, hash-verified

42
43
44class ServerState:
45 class="st">"""
46 Shared servers state that is available between all protocol instances.
47 class="st">"""
48
49 def __init__(self) -> None:
50 self.total_requests = 0
51 self.connections: set[Protocols] = set()
52 self.tasks: set[asyncio.Task[None]] = set()
53 self.default_headers: list[tuple[bytes, bytes]] = []
54
55
56class Server:

Callers 6

test_http_autoFunction · 0.90
test_websocket_autoFunction · 0.90
get_connected_protocolFunction · 0.90
get_connected_protocolFunction · 0.90
__init__Method · 0.85

Calls

no outgoing calls

Tested by 3

test_http_autoFunction · 0.72
test_websocket_autoFunction · 0.72
get_connected_protocolFunction · 0.72