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

Function _two_channel_session

tests/server/test_session.py:75–78  ·  view source on GitHub ↗

Distinct request/standalone outbounds so routing assertions can tell the channels apart.

(request_ch: StubOutbound, standalone_ch: StubOutbound)

Source from the content-addressed store, hash-verified

73
74
75def _two_channel_session(request_ch: StubOutbound, standalone_ch: StubOutbound) -> ServerSession:
76 """Distinct request/standalone outbounds so routing assertions can tell the channels apart."""
77 conn = Connection.from_envelope(LATEST_HANDSHAKE_VERSION, None, None, outbound=standalone_ch)
78 return ServerSession(request_ch, conn)
79
80
81@pytest.mark.anyio

Calls 2

ServerSessionClass · 0.90
from_envelopeMethod · 0.80

Tested by

no test coverage detected