[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Extending LuaSocket (was Re: Skinning Lua Sockets)
- From: Diego Nehab <diego@...>
- Date: Fri, 8 Aug 2003 13:21:54 -0400 (EDT)
> I am still trying to understand the design behind the implementation.
> I will be happy to document the API of this "mini" library and
> maintain it under the same licensing terms of Lua. To this end do
> you have any design documents or any other information in the
> design and implementation of the Lua Sockets that would help
> me in skinning the Lua Sockets so that a reusable library gets
When I started implementing LuaSocket 2.0, I had this delusion of making
all modules (udp, tcp, file, pipe, local etc, even http, ftp etc)
dynamically loadable by LuaSocket, just as now luasocket and other
libraries can be loaded dynamically by Lua. The support is all there for
that, and this is why I wrote the auxiliar.[ch] module. Modules written
by other people would use the interface as a mini luasocket C API. It
was part of my delusion that people would write modules for
serial/parallel port communication, named pipes, ssl and whatever else
they could come up with. :o)
The input buffering module and the IO abstraction are there to try help
implementors of other modules to preserve the look and feel of
LuaSocket. I am (was) planning to write a section on the manual about
how to extend luasocket and that section would cover all the modules in
the implementation. Instead, I wrote about it in the header files (did
you check auxiliar.h, buffer.h, io.h etc?).
> My interest in such a library is to ease the effort in creating
> a robust and light weight MBUS (http://www.mbus.org) binding
> in Lua. I believe I will be able to reuse most of the code
> in Lua Sockets. I am kind of undecided on whether I should
> extend and hence branch of from Lua Sockets or should I try
> to integrate the MBUS implementation into Lua Sockets.
I would be very happy to help you write a module (like mbus.c, say) that
would be compatible with LuaSocket. I would help you out with the
integration details that you might need, of course, since I am not
familiar with MBUS.
> Lua Sockets is one of the best add-on to Lua that I have studied
> so far in terms of design and documentation and the clean
> coding style. You will always have my respect. Great job!
Thanks! It is the result of at least 3 rewrites (over more than one
year) since LuaSocket 1.4, and in the redesign process I was lucky to
have the help of Carlos Cassino.