cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: One way connection

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 10 Jul 2003 14:36:59 +0200 (CEST)

On Mon, 7 Jul 2003, Eduardo Gómez wrote:

> I would like to know if there is any easy way to implement a unidirectional
> transfer with libcurl. I'm developing a test program which sends a burst of
> POST request to a server, in order to test its performance. I'm doing so by
> setting a really low CURLOPT_TIMEOUT when sending the petition, but the
> Alarm Clock message appears, indicating (as I understood it) that the alarm
> signal wasn't caught by libcurl, thus aborting the program.

I'd say it sounds like a libcurl bug. libcurl only uses alarm() for name
resolves, and it should always clear the alarm() after usage, thus preventing
this to happen.

> Any idea of how to indicate libcurl that no response is needed, with using
> the timeout method?

The only way is to set a callback that does nothing with the data it receives.
You can stop the data from being sent, as that is what you ask the server to
do...

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
Received on 2003-07-10