MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / waiting_app

Function waiting_app

tests/interaction/transports/test_bridge.py:48–53  ·  view source on GitHub ↗
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

46 disconnect_seen = anyio.Event()
47
48 async def waiting_app(scope: Scope, receive: Receive, send: Send) -> None:
49 assert scope["type"] == "http"
50 assert (await receive())["type"] == "http.request"
51 await send({"type": "http.response.start", "status": 200, "headers": []})
52 seen_after_request.append(await receive())
53 disconnect_seen.set()
54
55 async with httpx.AsyncClient(transport=StreamingASGITransport(waiting_app), base_url="http://bridge") as http:
56 async with http.stream("GET", "/wait") as response:

Callers

nothing calls this directly

Calls 2

receiveFunction · 0.50
sendFunction · 0.50

Tested by

no test coverage detected