MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / sse

Method sse

crates/opencode-mcp/src/client.rs:209–218  ·  view source on GitHub ↗

Create a client that communicates over SSE.

(
        server_name: String,
        tool_registry: Arc<McpToolRegistry>,
        url: String,
        headers: Option<HashMap<String, String>>,
    )

Source from the content-addressed store, hash-verified

207
208 /// Create a client that communicates over SSE.
209 pub async fn sse(
210 server_name: String,
211 tool_registry: Arc<McpToolRegistry>,
212 url: String,
213 headers: Option<HashMap<String, String>>,
214 ) -> Result<Self, McpClientError> {
215 let client = Self::new(server_name, tool_registry);
216 client.connect_sse(url, headers).await?;
217 Ok(client)
218 }
219
220 // -- Connection methods ---------------------------------------------------
221

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
connect_sseMethod · 0.80

Tested by

no test coverage detected