cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Fwd: [PATCH] check ip callback

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 27 Sep 2007 14:22:56 -0700

On Thu, Sep 27, 2007 at 01:56:22PM -0700, Alexey Pesternikov wrote:
> If we are going to add one more callback I would prefer to NOT mix it with the
> SOCKOPT but make the separated one:
>
> struct curl_sockaddr {
> int family,
> int socktype,
> int protocol,
> socklen_t addrlen,
> struct sockaddr addr
> }; /* or something like that */
>
> typedef int (*curl_iptranslate_callback)(void *clientp,
> curlsocktype purpose,
> struct curl_sockaddr_info* address);
> That would have much cleaner semantics.

The semantics would be even clearer if the new callback were responsible
for returning an open and configured socket instead of just an address.
That eliminates the open/changeaddress/close/open loop with changeaddress/open
and provides even more flexibility for users who need libcurl to operate on
an already-open socket.

 typedef int (*curl_sockopen_callback)(void *clientp,
                                       curlsocktype purpose,
                                       const Curl_addrinfo* address,
                                       curL_socket_t *fd);

>>> Dan

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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET