cURL / Mailing Lists / curl-library / Single Mail

curl-library

Basic usage - easy vs multi in multithreaded application

From: Juan Manuel Lopez Baio <jmbaio_at_gmail.com>
Date: Fri, 15 Sep 2006 11:14:16 -0300

Hello All,

I'm a brand new libcurl user. I'm going to integrate some of its
functionality in an already existing system, and after reading the
tutorial, some of the doc and a few example source files, I have a
question:

the application which I'm developing (BTW: C++, Linux) acts as a
server for other apps, and eventually may need to provide some file
transfers between workstations, which is what I chose curl for.
The thing is that, obviously, my server shouldn't block during transfers.
I'm not quite sure of this, so correct if I'm wrong: using the multi
interface, I would get non-blocking behaviour (through non-blocking
sockets) by default?
If so, would there be any significant disadvantage if I preferred to
use the easy interface (which I understand, does block), encapsulating
it in a class that would handle multiple transfers in its own threads?
I ask this because there's probably a few common ways to do this with
Curl that more experienced users may point out.

Thanks a lot,

Juan
Received on 2006-09-15