curl-library
Re: Fwd: [PATCH] check ip callback
Date: Sat, 29 Sep 2007 21:01:31 -0700
On 9/29/07, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Thu, 27 Sep 2007, Alexey Pesternikov wrote:
>
> >>> struct curl_sockaddr {
> >>> int family,
> >>> int socktype,
> >>> int protocol,
> >>> socklen_t addrlen,
> >>> struct sockaddr addr
> >>> }; /* or something like that */
>
> [...]
>
> >> typedef int (*curl_sockopen_callback)(void *clientp,
> >> curlsocktype purpose,
> >> const Curl_addrinfo* address,
> >> curL_socket_t *fd);
> >>
> >> Personally, I'm fine with that too.
>
> One more nit: 'struct sockaddr addr' is not enough storage room if you'd
> want
> to change from for example an IPv4 address to say an IPv6 one...
Sure, I will take care of that.
Looks like everybody is ok with the proposed interface? If so I will go
ahead and make a patch on monday.
/* check ip and open the socket. returns socked opened or -1 on error */
typedef curl_socket_t (*curl_sockopen_callback)(void *clientp,
curlsocktype purpose,
const Curl_addrinfo* address);
-- Alexey, http://page2rss.com RSS feed from almost any pageReceived on 2007-09-30