From: Matthew Bloch Date: 2002-07-18T00:08:39+09:00 Subject: Re: Patch to stop TCPSocket.new blocking on DNS lookups On Wednesday 17 July 2002 15:34, you wrote: > >>>>> "M" == Matthew Bloch writes: > > M> being made asychronous in the same manner. And of course there's the > fact M> that there's no Win32 implementation (or does Win32 sockets do > asychronous M> DNS already?). > > Well, getaddrinfo_a() is available only for glibc >= 2.2.4, no ? Yup, I believe it's a pretty new call. But unless we roll a DNS resolver into Ruby itself, an asynchronous resolver has to add an extra external dependency-- I'd rather it were glibc than anything else. > Have you looked at ADNS (GPL license) or cURL resolver ? I have, but these would require larger architectural changes to the socket library which I don't really have time to do. There are still some blocking calls left in there, but the most common one (to getaddrinfo, on connection) is sorted with the patch; and the function is only used where it's available, otherwise it drops back to the old behaviour. -- Matthew Bloch Bytemark Computer Consulting Limited http://www.bytemark.co.uk/ tel. +44 (0) 8707 455026