On Mar 7, 2011, at 4:08 AM, Jayanth Acharya wrote: > Had not looked there. Not sure if this is because at the moment I am working > on a Windows PC, the only examples I see are under here: > C:\Program Files\Lua5円.1\examples\luasocket > and I didn't find any "etc/" directory there. Take a look at the original distribution: http://w3.impa.br/~diego/software/luasocket/ http://luaforge.net/projects/luasocket/ > Also, the only examples seem to be fairly simple ones (as far as the network > programming aspects are concerned), though quite short and elegant ones at > that. I am lookingly for slightly more elaborate / real-life examples of > some real-life TCP based (hopefuly binary) application protocol > implementation. Hard to tell binary from text these days, but for what's worth, here is a little routine to read HTTP chunked transfer encoding: http://dev.alt.textdrive.com/browser/HTTP/HTTP.lua#L128 And the corresponding read( ... ) method: http://dev.alt.textdrive.com/browser/HTTP/TCPServer.lua#L111