Function serve

Source
pub async fn serve(router: &Router, listener: &TcpListener, conn_limit: usize)
Expand description

Continuously serve the Node API using the given router and TCP listener.

The number of simultaneous TCP stream connections will be capped at the given conn_limit.

This constructs a new JoinSet to use for limiting connections and then calls serve_next_conn in a loop. Any outstanding connections will not be counted toward the connection limit.