This has been included in the XLua distribution for the last month or so, but if anyone's missed it they can also download it directly. I've compiled LuaSocket against XLua so that it can be utilized.

LuaSocket is a TCP/UDP socket programming framework for Lua. More information can be found at the Lua Socket website