Re: Re: Working with curl connections as with sockets.
Date: Fri, 2 May 2008 22:47:47 +0200 (CEST)
On Wed, 30 Apr 2008, tetetest tetetest wrote:
> Because Curl_write() accepts argument of type 'void*', and not 'const
> void*', there is a warning when you compile with GCC:
> In future, it would be nice to change 'void*' to 'const void*' for
> Curl_write() and other functions that are not supposed to modify the
> buffers. So, the warning could serve as a reminder. :)
I agree, we should change Curl_write() accordingly. Your patch could be
committed with the const, and then we (I?) can go on to fix the existing code.
> Please feel free to comment.
#1 - These functions never return anything that hint the caller of them that
they return since they would otherwise block. It will force applications
to guess when they should just wait for the socket to become ready, or
when to bail out.
#2 - Less important: it doesn't use the standard 2 space indent levels, and it
has a few lines > 80 columns.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2008-05-02