pub async fn serve_within(
listener: impl Accept,
tls: Arc<ServerConfig>,
app: Router,
shutdown: impl Future<Output = ()>,
limits: ConnectionLimits,
) -> Result<()>Expand description
serve, within limits. A failed accept never ends serving: the
listener goes on, after limits.accept_pause when the failure is the
system’s (after_failure). A connection is closed when its
handshake is not done within limits.handshake, when no request head
has arrived within limits.first_head of the handshake, when an
HTTP/1.1 request head takes longer than limits.head from its first
bytes, and when it has waited limits.idle for its next request. The
listener holds at most limits.max connections at once.