Comments (5)
WinDNS functions seems superior to getaddrinfo
Superior how?
DnsQueryEx which does an asynchronous procedure call so it eliminates the need for thread pool
DnsQueryEx is only available on Windows 8 so would have to be feature-tested at runtime. It would also be good to double-check if it's really asynchronous and not just using the Windows thread pool.
Replacing GetAddrInfoW with DnsQuery_W doesn't seem compelling on its own but DnsQueryEx might be a good reason to switch. It should be 100% backwards compatible though.
from libuv.
We dropped support for windows 8 when Microsoft ended support
from libuv.
Superior how?
DnsQueryEx
supports cancellation, already asynchronous through APC and it also returns TTL value (I'm not sure if GetAddrInfoW
reports TTL too, though). Other than this variant, they're pretty similar I think.
I've also tried GetAddrInfoExW
, though it takes OVERLAPPED, it returns nonzero when the aforementioned argument is given.
I actually want to take part in implementing it, I thought this might be a good first issue as well.
from libuv.
The GetAddrInfoExW looks better, since it is in the existing ws2_32 library and seems to support passing an Event object via OVERLAPPED (which can be used with IOCP directly)
from libuv.
It would also be good to double-check if it's really asynchronous and not just using the Windows thread pool.
Even if the query itself is asynchronous (which I presume it would be, since it is presumably some sort of RPC call to the DNS implementation), waiting on the resulting OVERLAPPED handle event must occur in the thread-pool, since NT has no way to wait for async events to complete without resorting to waiting on them in the thread-pool. But still might be worth doing, as that thread-pool may be slightly better integrated with the kernel and with the few other OVERLAPPED operations that libuv does.
from libuv.
Related Issues (20)
- unit test watcher_cross_stop fail in wsl2 HOT 1
- build fail HOT 6
- If you attempt to send a UDP packet to an IPv4 address using an IPv6 socket, sendto() will report the WSAEFAULT error. HOT 10
- Missing symbols in the library file compared to the headers HOT 4
- Issue with GetSystemTimePreciseAsFileTime on Windows Server 2008 in libuv 1.48.0 and Suggested Fix HOT 1
- CMake build fails with FetchContent HOT 2
- the child process (forked from parent process which use libuv) crash with abort() called HOT 4
- UV_UDP_LINUX_RECVERR make loop busy HOT 1
- How can I use libuv raw socket in windows? HOT 1
- The uv__run_idle and uv__run_prepare stages of event loop are unclear HOT 3
- unix: uv_udp_open invalid HOT 3
- I'm going to assume this has been answered but let me know if there's reason to reopen. HOT 13
- new cygwin-induced compatibility bug HOT 1
- New release? HOT 44
- aix: fs_* tests are failing HOT 2
- ibmi: fs_* test are failing HOT 1
- Potential buffer overflow in uv_pipe_chmod() HOT 2
- win: `uv_available_parallelism` doesn't respect process affinity HOT 4
- win: new `uv_available_parallelism` returns double the expected threads in 32-bit applications HOT 1
- fs_utime_round fails on bcachefs HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libuv.