From 65c35845c54c7f84b1cf5b0e3d4c7bbdaf1014e3 Mon Sep 17 00:00:00 2001
From: Diego Nehab
Date: Tue, 14 Jun 2005 04:29:23 +0000
Subject: Working on the manual.
---
doc/index.html | 94 ++++++++++++++++++++++++++----------------------------
doc/reference.html | 4 +--
doc/socket.html | 8 ++---
3 files changed, 51 insertions(+), 55 deletions(-)
(limited to 'doc')
diff --git a/doc/index.html b/doc/index.html
index cfd3548..ee97e02 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -93,38 +93,24 @@ Windows XP, Linux, and Mac OS X.
-The library can be downloaded in source code from the following links:
-
-
-
-
-luasocket-2.0.tar.gz
-luasocket-2.0.zip
-
-
-
-
+The library can be downloaded in source code from the
+LuaSocket
+project page at LuaForge.
Besides the full C and Lua source code for the library, the distribution
contains several examples, this user's manual and basic test procedures.
-I am also providing PC Win32 binaries for those that want to give
-LuaSocket a try (those on Unix or Mac OS X can just type make).
-These are compatible with the
+Danilo Tuler is mantaining Win32 binaries for LuaSocket, which are also
+available from LuaForge. These are compatible with the
LuaBinaries
available from LuaForge.
-
-luasocket-2.0-win32.zip
-
-
-
-
-The quick and dirty way to use these binaries is to unpack everything into
-a directory, say c:\luasocket, then set LUA_INIT to load
+For those that want to give LuaSocket a quick try, download the
+stand-alone archive and unpack everything into
+a directory, say c:\luasocket. Then set LUA_INIT to load
the compat-5.1.lua and set LUA_PATH and
LUA_CPATH to look for files in the current directory:
@@ -142,10 +128,10 @@ do the following:
-c:\luasocket\> lua
+c:\luasocket\> lua50
Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
> http = require"socket.http"
-> print(http.request"http://www.tecgraf.puc-rio.br/luasocket/")
+> print(http.request"http://www.cs.princeton.edu/~diego/professional/luasocket/")
--> the source to this web page gets dumped to terminal
@@ -173,31 +159,39 @@ has been helping a lot too! Thanks to you all!
What's New
-The big change for the 2.0 (beta3) release was the adoption of the Lua 5.1
-package proposal. Naturally, there were a few bug fixes (a beta is a
-beta, is a beta).
+There is no big change for the 2.0 (final) release. It is basically a
+bug fix release. The only improvement is in the non-blocking
+support.
-- New compat-5.1 distribution:
-
-- Installation uses new directory structure;
-
- Namespace hierarchy is in now back in use (ex. socket.url
- instead of url);
-
- All modules call require even for standard libraries;
-
- - socket.select wasn't calling tm_markstart;
-
- 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 so it's not a kludge anymore;
-
- 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;
-
- http.PROXY wasn't working;
-
- url.escape escapes only dangerous characters.
+
- Improved: tcp{client}:send(data, i) now returns (i+sent-1). This is great for non-blocking I/O, but might break some code;
+
- Improved: HTTP, SMTP, and FTP functions accept a new field
+connect that can be used to replace the function invoked to
+create and connect the sockets used internally;
+
- Fixed: url.absolute() was not working when base_url was
+already parsed;
+
- Fixed: http.request() was redirecting even when the location
+header was empty (well, it shouldn't be empty);
+
- Fixed: tcp{client}:shutdown() was checking for group instead of class;
+
- Fixed: socket.try() can't be used in place of assert(). The manual and examples don't do it anymore;
+
- Improved: Get rid of require("base") kludge in package.loaded;
+
- Fixedd: Parts of the manual referred to require("http") instead of
+require("socket.http");
+
- Improved: Changed 'l' prefix in C libraries to 'c' to avoid clash with LHF
+libraries;
+
- Improved: Using bundles in Mac OS X;
+
- Fixed: luasocket.h was exporting luaopen_socket
+instead of luaopen_csocket;
+
- Fixed: udp:setpeername() only worked for
+udp{unconnected}. Now you can "disconnect" an UDP socket;
+
- Fixed: bug in http.lua that caused some requests to fail (Florian
+Berger);
+
- Fixed: bug in select.c that prevented sockets with descriptor 0 from working (Renato Maia);
+
- Fixed: "bug" that caused dns.toip to crash under uLinux;
+
- Fixed: "bug" that caused a crash in gethostbyname under VMS
+(Renato Maia);
+
- Improved: socket.DEBUG and socket.VERSION became socket._DEBUGs and socket._VERSION for uniformity with other libraries.
@@ -205,9 +199,11 @@ beta, is a beta).
Incompatibilities with previous versions
-- Namespaces are hierarchical again. This means that whoever used to
-call require("url") should update their code to
-require("socket.url").
+
- If you use the return value of tcp:send() and you
+use the extra parameters to select only part of the string to be sent, your
+code is now broken, but when you fix it, it will be much simpler;
+
- If you check socket.DEBUG or socket.VERSION,
+change it to socket._DEBUG or socket._VERSION.
diff --git a/doc/reference.html b/doc/reference.html
index b2e31d5..fd5140b 100644
--- a/doc/reference.html
+++ b/doc/reference.html
@@ -142,7 +142,7 @@ Support, Manual">
Socket
-DEBUG,
+_DEBUG,
dns,
gettime,
newtry,
@@ -155,7 +155,7 @@ Support, Manual">
tcp,
try,
udp,
-VERSION.
+_VERSION.
diff --git a/doc/socket.html b/doc/socket.html
index 18c71d1..5cc7157 100644
--- a/doc/socket.html
+++ b/doc/socket.html
@@ -85,8 +85,8 @@ the user can also specify the local address and port to bind
-
-socket.DEBUG
+
+socket._DEBUG
@@ -372,8 +372,8 @@ c = socket.try(socket.connect("localhost", 80))
-
-socket.VERSION
+
+socket._VERSION
--
cgit v1.2.3-55-g6feb