[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua socket programming examples
- From: Jayanth Acharya <jayachar88@...>
- Date: Sun, 6 Mar 2011 23:16:38 +0530
While the 'reference' section of the LuaSocket extension lib is nice and informative, what I am really missing (as a Lua newbie) is something similar to the Beej's Network Programming in C tutorial. Is there something similar available ? Or some examples that I could study, which allows me to focus on the nuances of network programming, without having to learn too much of anything else at the moment ?
What I would like to understand is how to deal with receive buffers in Lua, how to to stitch together segmented TCP data to identify message boundaries (given message-length in the application protocol) etc. The message is all binary data, and need to do lot of byte-order (htonX / ntohX) corrections etc. I'd prefer the example to be pure Lua, and using LuaSocket.
regards,
Jay