Re: CURLINFO_LASTSOCKET change
Date: Mon, 24 Apr 2006 23:03:40 +0200 (CEST)
On Mon, 24 Apr 2006, David McCreedy wrote:
> The curl_easy_getinfo processing for CURLINFO_LASTSOCKET returns the last
> socket without regard to its current status. This small enhancement to
> lib/getinfo.c would determine if the server sent a shutdown on the socket
> and if so, return a -1 to indicate that the socket is no longer valid.
That's indeed a good thought!
A pretty big nit on your approach though:
Using SSL_peek() like that is a big no-no. First, it won't build if you build
libcurl without SSL support. Then, it won't build if you build with GnuTLS
instead of OpenSSL.
SSL-related functions need to be offered by the generic (SSL-library agnostic)
interface (Curl_ssl_ prefixed) provided by sslgen.c, to allow us to support it
in an independent manner.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-04-24