(
transport: &mut UnixStreamTransport,
client_identity: &DaemonClientIdentity,
)
| 2103 | |
| 2104 | #[cfg(unix)] |
| 2105 | async 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)] |
| 2126 | async fn projectless_response( |
no test coverage detected