lua-users home
lua-l archive

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

Hi all,

Someone  asked for  a  thread-safe version  of  LuaSocket  (I confess  I
haven't built Lua-4.1a yet), so I decided  to send the status of what we
should have for the next version (i.e. my wish list).

The current version should work fine with  threads as long as they don't
fiddle with  the same socket at  the same time. Next  version won't have
this limitation (although I see no use for concurrent access to the same
socket...). The point  is, the current code might crash  due to a racing
condition somewhere in the receive buffer code, next version won't.

My efforts are concentrated on the Lua  code, though. The HTTP, SMTP and
FTP  code  have  been  reformulated  to conform  to  LTN  7  (Modules  &
Packages). I might add persistent connection support where possible (for
performance reasons).  SMTP already has  it hidden, HTTP is  (now) ready
for it. I will se what I can do for FTP.

Yes, the new version will break  compatibility with the current API, but
with added  functionality. I will  try to provide a  compatibility layer
along with the sample code. The changes  are not many. Mostly naming and
parameter passing  (the prototypes  did not  fit one  line and  that was
killing me :-).

There is also a new module for URL parsing and composition (nasty rules)
and  I might  include  partial  MIME support  (as  an  evolution of  the
code.lua module). That might require some C code, and might result in an
independent library (after all, it has nothing to do with sockets).

If anyone has any suggestions, bug-reports etc please send them directly
to me as usual (preferably before I  get to compile Lua-4.1a and release
the next LuaSocket version :-).

Diego Nehab.

PS: Game-programmers  out there:  has anyone  of you  tried implementing
game networking code using LuaSocket? and failed? Why? I'd like to learn
more about it. Are there any accepted standards?