MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / _SendTracker

Class _SendTracker

src/codegraphcontext/api/mcp_sse.py:67–77  ·  view source on GitHub ↗

ASGI ``send`` wrapper that records whether a response was started.

Source from the content-addressed store, hash-verified

65
66
67class _SendTracker:
68 """ASGI ``send`` wrapper that records whether a response was started."""
69
70 def __init__(self, send):
71 self._send = send
72 self.response_started = False
73
74 async def __call__(self, message) -> None:
75 if message.get("type") == "http.response.start":
76 self.response_started = True
77 await self._send(message)
78
79
80async def handle_sse(request: Request):

Callers 2

handle_sseFunction · 0.85
handle_messagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected