Code Monkey home page Code Monkey logo

Comments (4)

bnoordhuis avatar bnoordhuis commented on July 18, 2024

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.

vtjnash avatar vtjnash commented on July 18, 2024

We dropped support for windows 8 when Microsoft ended support

from libuv.

nikneym avatar nikneym commented on July 18, 2024

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.

vtjnash avatar vtjnash commented on July 18, 2024

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.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.