Why is 16 too few?  Do you have more than 8-16 name servers configured?
Remember, it is one fd per nameserver (or possibly 2 if it has to fall back
to TCP), NOT one fd per query, as my original reply stated.

The ares_getsock is what you'd use, and yes, it does have a limit of 16
fds.

-Brad

On 1/25/17 3:36 AM, David Guillen Fandos wrote:
Yeah agreed, but how do you retrieve the fds to use poll?
With getsock you get up to 16 sockets which is insufficient for my needs (and 
also, BTW, sounds like an arbitrary and
ridiculous number to hardcode in such a function)

Thanks!

On 25/01/17 04:05, Zan Lynx wrote:

That will not help because select has a hard coded limit of the number of bits 
in its read, write and error sets.

What could help us to open c-ares socket very early in the program to get a low 
FD number. Or switch to poll. I posted
a half done, good enough for me poll fix to this list some years ago. Or use 
one of the other APIs to get the socket
descriptors and poll.

Reply via email to