Skip to main content

limited_make_service

Function limited_make_service 

Source
pub(crate) fn limited_make_service(
    router: Router,
) -> MakeServiceWithConnectInfo<ConcurrencyLimit<Router>>
Expand description

What both listeners hand each accepted connection: router behind MAX_CONCURRENT_REQUESTS, carrying the peer’s address as [ConnectInfo].

One function rather than a wrapping per listener, because the wrapping is the cap: a listener that turns router into a make-service any other way serves without it.