diff --git a/doc/index.html b/doc/index.html
index abba703..8eaa37a 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -88,7 +88,7 @@ Author: Diego Nehab
Download
-LuaSocket version 2.0 beta is now available for download! It is
+LuaSocket version 2.0 beta2 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 +99,8 @@ The library can be downloaded in source code from the following links:
-luasocket-2.0-beta.tar.gz
-luasocket-2.0-beta.zip
+luasocket-2.0-beta2.tar.gz
+luasocket-2.0-beta2.zip
@@ -116,7 +116,7 @@ LuaSocket a quick try:
-luasocket-2.0-beta-win32.zip
+luasocket-2.0-beta2-win32.zip
@@ -156,104 +156,43 @@ Special thanks go to
David Burgess, who has helped push the library to a new level of quality and
from whom I have learned a lot of stuff that doesn't show up in RFCs.
Special thanks also to Carlos Cassino, who played a big part in the
-extensible design seen in the C core of LuaSocket 2.0.
+extensible design seen in the C core of LuaSocket 2.0. Recently, Mike Pall
+has been helping a lot too! Thanks to you all!
What's New
-
-Everything is new! Many changes for 2.0 happened in the C layer,
-which has been almost completely rewritten. The code has been ported to
-Lua 5.0 and greatly improved. There have also been some API changes
-that made the interface simpler and more consistent. Here are some of
-the changes that made it into version 2.0:
+Changes in the 2.0-beta2 were mostly bug-fixes.
-- Major C code rewrite. Code is modular and extensible. Hopefully, other
- developers will be motivated to provide code for SSL, local domain
- sockets, file descriptors, pipes (on Unix) and named pipes etc;
-
-
- Everything that is exported by the library is exported inside
- namespaces. These should be obtained with calls to the
- require function;
-
-
- Functions such as
- send/receive/timeout/close etc do not exist anymore as stand-alone
- functions. They are now only available as methods of the appropriate
- objects;
-
-
- All functions return a non-nil value as first return value if successful.
- All functions return nil followed by error message
- in case of error. This made the library much easier to use;
-
-
- Greatly reduced the number of times the C select is called
- during data transfers, by calling only on failure. This might
- improve a lot the maximum throughput;
-
-
- TCP has been changed to become more uniform. It's possible to first
- create a TCP object,
- then connect or bind if needed, and finally use I/O functions.
- socket.connect and socket.bind functions are still
- provided for simplicity;
-
-
- This allows for setting a timeout value before connecting;
-
-
- And also allows binding to a local address before connecting;
-
-
- New socket.dns.gethostname function and shutdown
- method;
-
-
- Better error messages and parameter checking;
-
-
- Should be interrupt safe;
-
-
- UDP connected sockets can break association with peer by calling
- setpeername with address '*';
-
-
- Sets returned by socket.select are associative;
-
-
- Select checks if sockets have buffered data and returns immediately;
-
-
- socket.sleep and socket.gettime are now part of the
- library and are supported. They used to be available only when
- LUASOCKET_DEBUG was defined, but it turns out they might be useful for
- applications;
-
-
- socket.try and socket.protect provide a simple
- interface to exceptions that proved very in the implementation of
- high-level modules;
-
-
- Socket options interface has been improved. TCP objects also
- support socket options and many new options were added.
-
-
-
-
-Lots of changes in the Lua modules, too!
-
-
-
-- Every module loads only the modules that it needs. There is no waste
-of memory. LuaSocket core takes only 20k of memory;
-
-
- New MIME and LTN12 modules make all other modules much more powerful;
-
-
- Support for multipart messages in the SMTP module;
-
-
- The old callback mechanism of FTP and HTTP has been replaced with LTN12 sources and sinks, with advantage;
-
-
- Common implementation for low-level FTP and SMTP;
-
-
- FTP, HTTP, and SMTP are implemented in multiple levels in such a way
-that users will have no problems extending the functionality to satisfy
-personal needs;
-
-
- SMTP knows how to perform LOGIN and PLAIN authentication.
-
+
- Fixed silly last minute bugs in HTTP/SMTP that prevented them from
+running;
+
- usocket.c/wsocket.c look nicer thanks to Mike;
+
- UDP has a reasonable maximum datagram size;
+
- 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 compiles 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.
@@ -262,25 +201,8 @@ personal needs;
-- The introduction of namespaces affects all programs that use LuaSocket,
-specially code that relies on global functions. These are no longer
-available. Note that even the support modules (http, smtp
-etc) are independent now and should be "require"d;
-
-
- FTP, SMTP and HTTP are completely new; I am sure you will
-agree the new stuff is better;
-
-
- WARNING: The new send, receive,
-sendto, setpeername and setsockname,
-return convention WILL break old code;
-
-
- To enable local binding before connect, the bind method
- does not call listen anymore. It is the new listen
-method that turns a TCP object into a server object;
-
-
- socket.time changed to socket.gettime for uniformity;
-
-
- Interface to options has changed.
+
- New send inteface doesn't send multiple arguments anymore;
+
- Time is replaced by gettime with advantages.
diff --git a/doc/socket.html b/doc/socket.html
index 129b134..c7525eb 100644
--- a/doc/socket.html
+++ b/doc/socket.html
@@ -332,10 +332,6 @@ universe. You should subtract the values returned by this function
to get meaningful values.
-
-The function returns the time as a number.
-
-
t = socket.gettime()
-- do stuff
diff --git a/doc/tcp.html b/doc/tcp.html
index 30e06f4..dfc2c29 100644
--- a/doc/tcp.html
+++ b/doc/tcp.html
@@ -213,10 +213,12 @@ The method returns a string with local IP address and a number with
the port. In case of error, the method returns nil.
-
+
+master:getstats()
client:getstats()
+server:getstats()
@@ -414,6 +416,29 @@ The method returns 1 in case of success, or nil otherwise.
Note: The descriptions above come from the man pages.
+
+
+
+master:setstats(received, sent, age)
+client:setstats(received, sent, age)
+server:setstats(received, sent, age)
+
+
+
+Resets accounting information on the socket, useful for throttling
+of bandwidth.
+
+
+
+Received is a number with the new number of bytes received.
+Sent is a number with the new number of bytes sent.
+Age is the new age in seconds
+
+
+
+The method returns 1 in case of success and nil otherwise.
+
+