Re: reached select() limit

2017-01-26 Thread David Guillen Fandos
and before the close, that means I should have less than 512 threads right? Well in my case all sockets are created in the same thread so no worries about that Thanks! On 26/01/17 20:56, Zan Lynx wrote: > On 1/26/2017 11:40 AM, David Guillen Fandos wrote: >> Genious! I didn't know abo

Re: reached select() limit

2017-01-26 Thread David Guillen Fandos
Genious! I didn't know about that thing! So you just dup the fd and close the old one right? Thanks! David On 26/01/17 16:41, Leif Thuresson wrote: Just remembered an quirk we used to do way back to over come a problem with old solaris versions where the stdio struct used a char for the file de

Re: reached select() limit

2017-01-25 Thread David Guillen Fandos
guarantee that all fds are gonna get created at start right? If some server doesn't respond it might try TCP and open a new socket, am I right? Thanks for your help! David On 25/01/17 15:17, Daniel Stenberg wrote: On Wed, 25 Jan 2017, David Guillen Fandos wrote: Yeah agreed, but how do

Re: reached select() limit

2017-01-25 Thread David Guillen Fandos
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 bec

reached select() limit

2017-01-24 Thread David Guillen Fandos
Hello, I wrote an app that was crashing in c-ares due to fds being bigger than 1024. While c-ares might be using around 30 fds it is unable to use fds above 1024. I looked into using getsock but it is capped at 16 sockets (although could be worked around by building c-ares myself and tweakin

Cancelling in-flight DNS request

2014-04-19 Thread David Guillen Fandos
Hello, I just wondered whether it was possible to cancel an in-flight request for a particular host without cancelling them all. For example, let's say I query two DNS requests using "ares_gethostbyname" and I keep looping and polling FDs. After some time I just decide to cancel one of the request