cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Non-Blocking File Operations

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 7 Jul 2010 19:33:21 +0200 (CEST)

On Tue, 6 Jul 2010, Paul Romero wrote:

> Does libcurl have a way to notify a program that a operations like sending
> and receiving a file are complete ?

libcurl has two primary interfaces, the easy and the multi, and both have ways
to inform the user that the transfers are complete.

> Perhaps, via a callback function or something similar.

We have plenty of examples and documentation. I assume you're using the multi
interface? The curl_multi_info_read() is what you want.

> The manual suggests non-blocking mode is essentially what Linux/Unix
> select() and poll() provide.

That sounds wrong. select() and poll() are two functions that wait for
activity on one or more file descriptors. libcurl sends and receives data over
network connections.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-07