cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: not wait for reply

From: Victor Zhang <victorzhang_urstruly_at_yahoo.com>
Date: Sat, 21 Aug 2004 11:26:59 -0700 (PDT)

Yeah, the client ask the server to do something
through an HTTP request, but
don't have to wait for the operation to finish. This
is what I call
"blackhole".

 I am using the multi interface, which allows me to
select on three fd_sets.
Now the question is:
Can we assume that send is complete when the write
fd_set is empty? so I can
stop redriving the multi_perform function. This is
probably true for the a
HTTP request that involves only one send operation
such as a simple GET
request.

However, for a POST request which may upload multiple
files, is this
assumption true? Could libcurl be only interested in
receiving data after
the first send ? and I would like to stop redriving
only after making sure
all data are delivered.

Victor
----- Original Message -----
From: "codemastr" <codemstr_at_ptd.net>
To: "libcurl development" <curl-library_at_cool.haxx.se>
Sent: Saturday, August 21, 2004 11:18 AM
Subject: Re: not wait for reply

> > I am working on a "blockhole" http client, which
send an HTTP request to
> the apache and does not want to wait for the reply.
Is there a simple way
to
> do this in curl. Basically, how do I detect that all
send operations is
> complete in libcurl and break out?
>
> Well I haven't the slighted clue what "blockhole"
is, but from your
> description, it sounds like you are talking about
non-blocking socket
> operations. This is what curl's multi interface is
for.
>
http://curl.haxx.se/lxr/source/docs/examples/multi-app.c
that provides a
> decent overview of how the multi interface works. It
allows the HTTP
request
> to be handled asynchronously. To be truly
asynchronous, you will need to
> have libcurl compiled with c-ares support as well.
>
> Dominick Meglio
>
>
>
Received on 2004-08-21