Serve a connection, routing to gRPC or HTTP based on content-type.
(&self, stream: S)
| 137 | |
| 138 | /// Serve a connection, routing to gRPC or HTTP based on content-type. |
| 139 | pub async fn serve<S>(&self, stream: S) -> Result<(), Box<dyn std::error::Error + Send + Sync>> |
| 140 | where |
| 141 | S: AsyncRead + AsyncWrite + Unpin + Send + 'static, |
| 142 | { |
| 143 | self.serve_with_peer_identity(stream, None).await |
| 144 | } |
| 145 | |
| 146 | /// Serve a TLS connection with an optional mTLS peer identity. |
| 147 | pub async fn serve_with_peer_identity<S>( |
no test coverage detected