-LuaSocket version 2.0 beta2 is now available for download! It is
+LuaSocket version 2.0 (beta3) is now available for download! It is
compatible with Lua 5.0 and has been tested on
Windows XP, Linux, and Mac OS X.
@@ -99,8 +100,8 @@ The library can be downloaded in source code from the following links:
@@ -124,11 +125,15 @@ LuaSocket a quick try:
The quick and dirty way to use these binaries is to unpack everything into a
directory, say c:\luasocket (include all Lua files from the
LuaSocket distrbitution in the same directory too!).
-Then set LUA_INIT to load the lua.lua helper file:
+Then set LUA_INIT to load the compat-5.1.lua and set
+LUA_PATH and LUA_CPATH to look for files in that
+directory:
-c:\luasocket\> set LUA_INIT=@lua.lua
+c:\luasocket\> set LUA_INIT=@compat-5.1.lua
+c:\luasocket\> set LUA_CPATH=?.dll
+c:\luasocket\> set LUA_PATH=?.lua
@@ -142,9 +147,13 @@ c:\luasocket\> lua
Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
> http = require"http"
> print(http.request"http://www.tecgraf.puc-rio.br/luasocket/")
---> this file
+--> this gets dumped to terminal
+
Take a look at the installation section of
+the manual to find out how to properly install the library after you are
+done playing with it.
+
Special thanks
@@ -165,35 +174,31 @@ has been helping a lot too! Thanks to you all!
What's New
-Changes in the 2.0-beta2 were mostly bug-fixes.
+The big change for the 2.0 (beta3) release was the adoption of the Lua 5.1
+package proposal. There were several bug fixes too (a beta is a
+beta, is a beta).
-
Fixed silly last-minute-change bug in HTTP/SMTP;
-
usocket.c/wsocket.c look nicer thanks to Mike;
-
Finally total timeout is reliable on Windows! (found a pretty
-simple work around);
-
UDP has a reasonable maximum datagram size (8k);
-
Receive accepts the prefix optional argument (good for
-non-blocking);
-
Send doesn't support multiple arguments anymore;
-
Instead, send allows the selection of the substring
-to be sent (good for non-blocking);
-
Fixed bug that caused select return tables not to be associative
-on windows;
-
Should compile with g++;
-
New sample unix domain support;
-
New sample LPD support;
-
Comprehensive error messages;
-
New getstats and setstats methods to help throttling;
-
Listen defaults to 32 backlog;
-
SMTP/FTP/HTTP fail gracefully;
-
accept/connect/select interrupt safe
-
Fixed bug that didn't set accepted sockets as non-blocking
-
New timming functions sleep and gettime have
-higher resolution and no wrap around problems;
-
Bug fixes in the manual;
-
Fixed bug of missing cast in getfd.
+
New compat-5.1 distribution:
+
+
Instalation uses new directory structure;
+
Namespace hierarchy is in now back in use (ex. socket.url
+ instead of url);
+
Globals not visible from inside namespaces;
+
All modules call require even for standard libraries;
+
+
LTN12 avoids coroutines (so you can go wild on the C side);
+
Kludge on wsocket.c:sock_send for windows timeout issue
+ moved to buffer.c:sendraw;
+
socket.protect only catches errors thrown by socket.try;
+
Fixed udp:sendto to call sock_sendto instead of
+ sock_send;
+
close wasn't returning 1!
+
socket.gettime returns time since Unix Epoch 1/1/1970 (UTC)
+
socket.sleep is robust to interrupts;
+
socket.select wasn't calling tm_markstart;
+
http.PROXY etc wasn't working.
@@ -201,10 +206,9 @@ higher resolution and no wrap around problems;
Incompatibilities with previous versions
-
-
New send inteface doesn't send multiple arguments anymore;
-
Time is replaced by gettime with advantage.
-
+
Namespaces are hierarchical again. This means that whoever called
+require("url") should update their code to
+require("socket.url").
@@ -225,6 +229,8 @@ those that have compatibility issues.