[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua and networking - possibly basic question
- From: Alex Queiroz <asandroq@...>
- Date: Sat, 29 Oct 2005 15:56:35 -0300
Hallo,
On 28/10/05, Steve Kemp <steve@steve.org.uk> wrote:
>
> As a proof of concept I put together a *basic* HTTP server
> skellington and a matching client.
>
> http://www.steve.org.uk/Software/lua-httpd/
>
In function pRead of libhttpd.c:
----
n = read(sockfd,buffer,sizeof(buffer)-1);
lua_pushnumber(L, n );
lua_pushstring(L, buffer );
----
Are you sure the buffer is always null-terminated?
--
-alex
http://www.ventonegro.org/