lua-users home
lua-l archive

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


Hi,

1) It would be great if your build process could support being built
directly into the interpreter. My system doesn't have dynamic linking,
so I had to hack your Makefiles (needed in any way, because the
compiler flags have to be <just so> to get it to actually run on the
target system).

You mean automatically? This is tough, isn't it? You have to
change your interpreter, and LuaSocket doesn't have access
to it. If you are building your own interpreter, on the
otherh and, it is simple to link LuaSocket to it.

Just add the obj files to your makefile, then make sure you
populate package.preload with luaopen_socket_core and
luaopen_mime_core.

3) It doesn't have ping functionality, though it wouldn't be hard to
do that, but why not? Pings that timeout are basically the only way I
can think of to check if the network is available or not.

I'd be happy to consider a patch for that. I believe it
would require an API and some C code.

I implemented my own (basic!) HTTP client instead. It fetches from a
URL and returns the response minus headers. Here's the implementation
(sans libhttpd which is a socket object built into the interpreter).

If you are interested in the lowest possible number of lines
of code, I would suggest using popen and wget...

[]s,
Diego.