curl-library
ares_getsock() return value
Date: Fri, 11 Jan 2013 13:54:45 +0100
I'm not sure it matters, but the comment in asyn-ares.c is
wrong:
/*
...
* Returns: CURLE_OK always!
*/
int Curl_resolver_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
..
int max = ares_getsock((ares_channel)conn->data->state.resolver,
(ares_socket_t *)socks, numsocks);
...
return max;
}
Here 'max' is a bitmap of readable (or writable) sockets AFAICS.
And multi_getsock() seems to handle this correctly. Except maybe for
16-bit systems, DOS. The bitmap is an 'unsigned int' in multi.c !?
BTW. C-ares handles max 16 sockets here, but multi.c handles
"only" 2 * MAX_SOCKSPEREASYHANDLE==10. A little too conservative?
--gv
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-01-11