orthecreedence / cl-async

Asynchronous IO library for Common Lisp.
MIT License
273 stars 40 forks source link

Add reverse-dns-lookup #130

Closed orivej closed 9 years ago

orivej commented 9 years ago

This is a fairly straightforward export of uv_getnameinfo, similar to dns-lookup.

reverse-dns-lookup makes the callback be called with HOST and SERVICE arguments, but the service argument after this change will always be "0", so it should probably just be dropped. This patch adds the port argument (to look service name from /etc/services on Linux), but somehow the port number used for lookup is the specified port times 256. I also don't see any use in bundling HOST resolution and SERVICE name resolution in the same function.

orthecreedence commented 9 years ago

This looks great, sorry about the lag (been very busy at work). Thanks for the awesome update (and thanks for writing tests)!