3 ms·
Nice write–up. I happened to write a little dns client last month too, although I avoided all the low–level protocol stuff and concentrated on the high–level bu
by db48x 5y ago
Nice write–up. I happened to write a little dns client last month too, although I avoided all the low–level protocol stuff and concentrated on the high–level business logic: pull many rows from a database, then create and execute as many queries in parallel as possible.
It’s a good demonstration of why I like Rust so much. All the pieces were already there, and Rust’s type system ensures that I cannot have any unexpected sources of errors. My error–handling code is honestly pretty crude, but the compiler ensures that I have actually handled them all, and that there can be no surprises. No innocent–looking library functions that – surprise! – can actually throw exceptions.