Function mini_telegram::server::run
source · pub async fn run(listener: TcpListener, shutdown: impl Future)Expand description
Run the mini-telegram server.
Accepts connections from the supplied listener. For each inbound connection,
a task is spawned to handle that connection. The server runs until the
shutdown future completes, at which point the server shuts down
gracefully.
tokio::signal::ctrl_c() can be used as the shutdown argument. This will
listen for a SIGINT signal.