curl-users
Re: How to make libcurl show content while updating?
Date: Thu, 2 Mar 2017 16:29:21 -0600
What do you mean "after it finish"? As libcurl receives data, it makes
it available to you (the programmer) through a callback function. It
doesn't wait until it has the webpage or file completely downloaded.
On 3/2/17 4:07 PM, Rodrigo Zanatta Silva wrote:
> Lol, but you don't understand. The libcurl will only get the page
> after it finish. So, it will take 110 seconds and than show all eleven
> lines.
>
> But, can I get PARTIAL result? Like every 5 seconds read the *stdout*
> of the server, like:
>
> *TIME 0: Call the URL*
> *
> *
> *TIME 5: Read*
> line 0
>
> *TIME 10: Read*
> line 0
> line 1
>
> *TIME 15: Read*
> line 0
> line 1
>
> *TIME 20: Read*
> line 0
> line 1
> line 2
> *TIME 25: Read*
> ...
> *TIME 110: Finish*
> (only now curl print everything)
>
> Is this possible? Or do I need to use another strategy? Like write
> this in file and read it.
>
> 2017-03-02 18:16 GMT-03:00 Daniel Stenberg <daniel_at_haxx.se
> <mailto:daniel_at_haxx.se>>:
>
> On Wed, 1 Mar 2017, Rodrigo Zanatta Silva wrote:
>
> How can I make libcurl show this page while it is building,
> like in browser?
>
>
> libcurl delivers the data to the application as it arrives so it
> is up to the application to deal with that. Like a browser or
> otherwise.
>
> --
>
> / daniel.haxx.se <http://daniel.haxx.se>
> -----------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
> <https://cool.haxx.se/list/listinfo/curl-users>
> Etiquette: https://curl.haxx.se/mail/etiquette.html
> <https://curl.haxx.se/mail/etiquette.html>
>
>
>
>
> -----------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html
-- Nicholas Chambers Technical Support Specialist nchambers_at_lightspeedsystems.com 1.800.444.9267 www.lightspeedsystems.com
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-02