[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua and networking - possibly basic question
- From: "Ashwin Hirschi" <deery@...>
- Date: Sat, 29 Oct 2005 21:38:56 +0200
And while I'm at it: you can improve the write section by replacing the
length = strlen( data );
by a call to lua_strlen. That'll take embedded zeroes into account and will give the true length of the data (enabling you to send binary data, for images and such).
All this (and much more) can easily be gleaned from the Lua 5 reference manual. In this case the API section would be especially noteworthy:
http://www.lua.org/manual/5.0/manual.html#3
I'd consider it required reading, well worth the little time needed to absord it.
Ashwin.
--
no signature is a signature.