Serve a plaintext HTTP connection for sandbox service endpoints only.
(
&self,
stream: S,
)
| 205 | |
| 206 | /// Serve a plaintext HTTP connection for sandbox service endpoints only. |
| 207 | pub async fn serve_service_http<S>( |
| 208 | &self, |
| 209 | stream: S, |
| 210 | ) -> Result<(), Box<dyn std::error::Error + Send + Sync>> |
| 211 | where |
| 212 | S: AsyncRead + AsyncWrite + Unpin + Send + 'static, |
| 213 | { |
| 214 | let http_service = TowerToHyperService::new(request_id_middleware!(service_http_router( |
| 215 | self.state.clone() |
| 216 | ))); |
| 217 | |
| 218 | Builder::new(TokioExecutor::new()) |
| 219 | .serve_connection_with_upgrades(TokioIo::new(stream), http_service) |
| 220 | .await?; |
| 221 | |
| 222 | Ok(()) |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | #[derive(Clone, Debug)] |
no outgoing calls
no test coverage detected