More sensible header structure. Cute cow at the bottom

This commit is contained in:
Ian Gulliver
2019-04-25 03:18:54 +00:00
parent a3dfa24549
commit 8663055dd3
34 changed files with 282 additions and 303 deletions

View File

@@ -5,7 +5,7 @@
<p>Down another rabbit hole, this time into yet another seemingly simple problem: how do you turn a name into an address that you can connect() to without blocking your thread, in 2016. Lets survey state of the world:</p>
<h3><a href="http://man7.org/linux/man-pages/man3/getaddrinfo_a.3.html">getaddrinfo_a()</a></h3>
<h2><a href="http://man7.org/linux/man-pages/man3/getaddrinfo_a.3.html">getaddrinfo_a()</a></h2>
<p>Look, its exactly what we need! Just joking. Its has the same resolution behavior as getaddrinfo, but:</p>
@@ -15,7 +15,7 @@
<li>It uses <a href="http://man7.org/linux/man-pages/man7/sigevent.7.html">sigevent</a> to notify completion. This gives you a choice between a signal and a new thread. I thought we were doing this to avoid having to create a new thread for each resolution?</li>
</ul>
<h3><a href="http://www.gnu.org/software/adns/">libadns</a></h3>
<h2><a href="http://www.gnu.org/software/adns/">libadns</a></h2>
<ul>
<li>Its GPLed. Thats cool, but it does limit options.</li>
@@ -23,7 +23,7 @@
<li>It will hand you file descriptors to block on, but you have to ask (using adns_beforeselect()). This is designed for poll(), but doesnt work well with epoll; it doesnt tell you when to add and remove fds, so you have to track them yourself (since you cant iterate an epoll set), diff them since the last result, and change the epoll set. Its a mess.</li>
</ul>
<h3><a href="http://0pointer.de/lennart/projects/libasyncns/">libasyncns</a></h3>
<h2><a href="http://0pointer.de/lennart/projects/libasyncns/">libasyncns</a></h2>
<ul>
<li>It uses getaddrinfo() underneath, so you get standard behavior. Woo!</li>
@@ -31,7 +31,7 @@
<li>Its API isnt too crazy, but you wouldnt call it simple.</li>
</ul>
<h3><a href="http://c-ares.haxx.se/">c-ares</a></h3>
<h2><a href="http://c-ares.haxx.se/">c-ares</a></h2>
<p>I failed to find docs for this, but I found a gist with an <a href="https://gist.github.com/mopemope/992777">example</a>. Looks like the API is designed for use with select(), though theres a hook to get an fd when its created, so you might be able to associate it with a query, possibly unreliably. Again, youd have to recreate getaddrinfo() behavior yourself. Also, this gem is at the top of the header:</p>
@@ -46,7 +46,7 @@
<p>So maybe not.</p>
<h3>So now what?</h3>
<h2>So now what?</h2>
<p>Maybe we can build something. I really dont need to write another DNS library in my lifetime (the c-ares <a href="http://c-ares.haxx.se/otherlibs.html">Other Libraries</a> page links to my previous one, humorously). Lets see if we can scope some requirements:</p>