MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / serve_projectless_client

Function serve_projectless_client

src/daemon.rs:2105–2123  ·  view source on GitHub ↗
(
    transport: &mut UnixStreamTransport,
    client_identity: &DaemonClientIdentity,
)

Source from the content-addressed store, hash-verified

2103
2104#[cfg(unix)]
2105async fn serve_projectless_client(
2106 transport: &mut UnixStreamTransport,
2107 client_identity: &DaemonClientIdentity,
2108) -> Result<()> {
2109 while let Some(line) = transport.read_line().await? {
2110 let response = match serde_json::from_str::<JsonRpcRequest>(&line) {
2111 Ok(request) => projectless_response(&request, client_identity).await,
2112 Err(e) => Some(JsonRpcResponse::error(
2113 json!(null),
2114 ErrorCode::ParseError,
2115 format!("Parse error: {e}"),
2116 )),
2117 };
2118 if let Some(response) = response {
2119 write_json_rpc_response(transport, &response).await?;
2120 }
2121 }
2122 Ok(())
2123}
2124
2125#[cfg(unix)]
2126async fn projectless_response(

Callers 1

serve_socket_clientFunction · 0.85

Calls 4

projectless_responseFunction · 0.85
errorFunction · 0.85
write_json_rpc_responseFunction · 0.85
read_lineMethod · 0.45

Tested by

no test coverage detected