pub async fn collect_and_send_string_output(
    socket: Socket,
    sender: Sender<String>
) -> Result<(), Error>