lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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\Lua\5.1\examples\luasocket
> and I didn't find any "etc/" directory there.

Take a look at the original distribution:

> 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:

And the corresponding read( ... ) method: