cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Libcurl Multi-Environment Timing Problems

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 9 Jul 2010 20:30:20 +0200 (CEST)

On Thu, 8 Jul 2010, Paul Romero wrote:

> I can successfully send a single file via SFTP in the libcurl multi
> environment. The basic technique, is to call curl_multi_perform() and
> curl_multi_info_read() when Linux SIGIO occurs.

Whoa, that sounds like you're on your own then. That's not how we make the API
work and how thousands of users already made us of it successfully.

> The Linux socket is programmed for asynchronous IO and generates SIGIO
> whenever input or output to the socket is possible. (i.e. The standard
> fcntl() technique is used to configure the socket.)

It may be standard but it's not how you typically use libcurl.

> However, a few kludges are necessary to make the technique work. The one
> that disturbs me is that a 20 MS delay must be added prior to calling
> curl_multi_perform(). The details are described below. This technique is
> important to me because my target environment does not have libevent.

I'm sorry, but that sentense doesn't parse for me.

If you use curl_multi_perform() you don't want/need libevent. If you want
libevent-style processing, you don't use curl_multi_perform().

Instead of describing your problem, can you please tell us what you're trying
to accomplish and why just using the multi interface the regular way isn't
good enough?

-- 
  / 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-09