pub async fn handle_request<H, T, const N: usize>(
buf: &mut [u8],
io: T,
task_id: impl Display + Copy,
handler: H,
) -> Result<bool, HandlerError<T::Error, H::Error<T::Error>>>Expand description
A convenience function to handle a single HTTP request over a socket stream, using the specified handler.
Note that this function does not set any timeouts on the request-response processing
or on the IO operations. It is up that the caller to use the with_timeout function
and the WithTimeout struct from the edge-nal crate to wrap the future returned
by this function, or the socket stream, or both.
Parameters:
buf: A work-area buffer used by the implementationio: A socket streamtask_id: An identifier for the task, used for logging purposeshandler: An implementation ofHandlerto handle incoming requests