Function nails::client::handle_connection
source · [−]pub async fn handle_connection(
config: Config,
socket: TcpStream,
cmd: Command,
open_input_stream: impl Future<Output = Receiver<ChildInput>> + Send + 'static
) -> Result<Child, Error>
Expand description
Implements the client side of a single connection on the given socket.
The input_stream
is lazily instantiated because servers only optionally accept input, and
clients should not begin reading stdin from their callers unless the server will accept it.