cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Working with curl connections as with sockets.

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 9 May 2008 14:21:42 -0700

On Fri, May 09, 2008 at 10:49:47PM +0200, Daniel Stenberg wrote:
> RCS file: docs/examples/sendrecv.c
> +int wait_on_socket(int sockfd, int for_recv, long timeout_ms)

This could be static.

> + char *request = "GET / HTTP/1.0\r\nHost: curl.haxx.se\r\n\r\n";

This has to be const char * (or better, const char * const) to avoid compiler
warnings on some systems.

> RCS file: docs/libcurl/curl_easy_send.3
> +\fBbuffer\fP is a pointer to the data of lengh \fBbuflen\fP that you want sent.

Typo on "length"

> RCS file: /cvsroot/curl/curl/lib/easy.c,v
> + if(data == NULL)
> + return CURLE_RECV_ERROR;
> +
> + /* only allow recv to be called on handles with CURLOPT_CONNECT_ONLY */
> + if(! data->set.connect_only)
> + return CURLE_RECV_ERROR;

Wouldn't these error codes be more descriptive as CURLE_BAD_FUNCTION_ARGUMENT
and CURLE_UNSUPPORTED_PROTOCOL?

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-05-09