1) Well yes :] I had seen this: http://w3.impa.br/~diego/software/luasocket/tcp.html#receive
I was trying to find a list of errors that it might throw back at me? I swear I must be missing it somewhere... halp?
2) Well that was my justification for wanting to make it little guess-work to understand a C tutorial in Lua... Gotta start somewhere :]
3) Linux has a lovely getaddrinfo_a() that does lookups in parallel... you could start multiple worker threads with something like lua-lanes to do individual getaddrinfo()'s but that's a lot of responsibility/liability on you... I wish getaddrinfo_a() were portable XD
4) Okay, maybe I only wanted to break abstractions for using different polling interfaces/APIs. :getfd() was hard, lol. (j/k) The more I dug into the source for luasocket the more I wanted to create my own binding. I think what Diego did is great, but there's a lot of code in there done for efficiency (he has his own buffer object). I try tried to write as little as possible so as to avoid introducing my own unexpected behavior -- but I'm not implying luasocket isn't well-written. I just wanted to use what was already there like luaL_Buffer to copy out from recv() and such.