Function serve

Source
pub async fn serve<In, Out, H>(
    address: SocketAddr,
    version: Version,
    server_fqdn: Option<String>,
    idle_timeout: Duration,
    handler_fn: impl Fn() -> H,
    metrics: impl Metrics<Out, In>,
) -> Result<()>
where In: Message, Out: Message, H: GenericClient<In, Out> + 'static,
Expand description

Spawn a CTP server that serves connections at the given address.