From 0c3cdd5ef2485a79d6fec9261f2850c41577d5b3 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Fri, 12 Aug 2005 05:56:32 +0000 Subject: Final push for release... --- doc/ftp.html | 10 ++++++++-- doc/http.html | 7 +++++-- doc/index.html | 4 +++- doc/installation.html | 14 ++++++-------- doc/reference.html | 4 ++-- doc/smtp.html | 8 ++++++-- doc/socket.html | 6 +++--- doc/tcp.html | 21 ++++++++++++--------- 8 files changed, 45 insertions(+), 29 deletions(-) (limited to 'doc') diff --git a/doc/ftp.html b/doc/ftp.html index 7860c27..8b7ed96 100644 --- a/doc/ftp.html +++ b/doc/ftp.html @@ -106,6 +106,7 @@ ftp.get{
  [port = number,]
  [type = string,]
  [step = LTN12 pump step,]
+  [create = function]
}

@@ -138,7 +139,9 @@ authentication. Defaults to "ftp:anonymous@anonymous.org";
  • step: LTN12 pump step function used to pass data from the -server to the sink. Defaults to the LTN12 pump.step function. +server to the sink. Defaults to the LTN12 pump.step function; +
  • accept: An optional function to be used instead of +socket.tcp when the communications socket is created.

    @@ -188,6 +191,7 @@ ftp.put{
      [port = number,]
      [type = string,]
      [step = LTN12 pump step,]
    +  [create = function]
    }

    @@ -220,7 +224,9 @@ authentication. Defaults to "ftp:anonymous@anonymous.org";
  • step: LTN12 pump step function used to pass data from the -server to the sink. Defaults to the LTN12 pump.step function. +server to the sink. Defaults to the LTN12 pump.step function; +
  • accept: An optional function to be used instead of +socket.tcp when the communications socket is created.

    diff --git a/doc/http.html b/doc/http.html index af58571..27942b1 100644 --- a/doc/http.html +++ b/doc/http.html @@ -131,7 +131,8 @@ http.request{
      [source = LTN12 source],
      [step = LTN12 pump step,]
      [proxy = string,]
    -  [redirect = boolean]
    +  [redirect = boolean,]
    +  [create = function]
    }

    @@ -178,7 +179,9 @@ pump step function used to move data. Defaults to the LTN12 pump.step function.
  • proxy: The URL of a proxy server to use. Defaults to no proxy;
  • redirect: Set to false to prevent the -function from automatically following 301 or 302 server redirect messages. +function from automatically following 301 or 302 server redirect messages; +
  • accept: An optional function to be used instead of +socket.tcp when the communications socket is created.

    diff --git a/doc/index.html b/doc/index.html index 933fa5f..e596f8e 100644 --- a/doc/index.html +++ b/doc/index.html @@ -168,6 +168,7 @@ support.

  • Improved: tcp:send(data, i, j) to return (i+sent-1). This is great for non-blocking I/O, but might break some code;
  • Improved: HTTP, SMTP, and FTP functions to accept a new field create that overrides the function used to create socket objects; +
  • Fixed: smtp.send was hanging on errors returned by LTN12 sources;
  • Fixed: url.absolute() to work when base_url is in parsed form;
  • Fixed: http.request() not to redirect when the location @@ -194,7 +195,8 @@ with descriptor 0 to be ignored (Renato Maia);
  • Fixed: "Bug" that caused gethostbyname to crash under VMS (Renato Maia);
  • Fixed: tcp:send("") to return 0 bytes sent (Alexander Marinov); -
  • Improved: socket.DEBUG and socket.VERSION became socket._DEBUGs and socket._VERSION for uniformity with other libraries. +
  • Improved: socket.DEBUG and socket.VERSION became socket._DEBUGs and socket._VERSION for uniformity with other libraries; +
  • Improved: socket.select now works on empty sets on Windows. diff --git a/doc/installation.html b/doc/installation.html index 59815fa..62604ed 100644 --- a/doc/installation.html +++ b/doc/installation.html @@ -71,11 +71,11 @@ Here is the standard LuaSocket distribution directory structure:

     <ROOT>/compat-5.1.lua
    -<ROOT>/socket.lua
    -<ROOT>/lsocket.dll
    -<ROOT>/mime.lua
    -<ROOT>/lmime.dll
     <ROOT>/ltn12.lua
    +<ROOT>/mime/init.lua
    +<ROOT>/mime/core.dll
    +<ROOT>/socket/init.lua
    +<ROOT>/socket/core.dll
     <ROOT>/socket/http.lua
     <ROOT>/socket/tp.lua
     <ROOT>/socket/ftp.lua
    @@ -83,10 +83,8 @@ Here is the standard LuaSocket distribution directory structure:

    <ROOT>/socket/url.lua
    -

    Naturally, on Unix systems, lsocket.dll and lmime.dll -would be replaced by lsocket.so and lmime.so. In Mac OS -X, they would be replaced by lsocket.dylib and -lmime.dylib.

    +

    Naturally, on Unix systems, core.dll +would be replaced by core.so.

    In order for the interpreter to find all LuaSocket components, three environment variables need to be set. The first environment variable tells diff --git a/doc/reference.html b/doc/reference.html index fd5140b..b4b2f1d 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/smtp.html b/doc/smtp.html index bd18bfa..1e1523b 100644 --- a/doc/smtp.html +++ b/doc/smtp.html @@ -127,6 +127,7 @@ smtp.send{
      [port = number,]
      [domain = string,]
      [step = LTN12 pump step,]
    +  [create = function]
    }

    @@ -138,6 +139,7 @@ doesn't have a simple interface. However, see the a very powerful way to define the message contents.

    +

    The sender is given by the e-mail address in the from field. Rcpt is a Lua table with one entry for each recipient e-mail @@ -158,7 +160,9 @@ local machine host name;

  • step: LTN12 pump step function used to pass data from the -source to the server. Defaults to the LTN12 pump.step function. +source to the server. Defaults to the LTN12 pump.step function; +
  • accept: An optional function to be used instead of +socket.tcp when the communications socket is created.

    @@ -167,7 +171,7 @@ If successful, the function returns 1. Otherwise, the function returns

    -Note: SMTP servers are can be very picky with the format of e-mail +Note: SMTP servers can be very picky with the format of e-mail addresses. To be safe, use only addresses of the form "<fulano@example.com>" in the from and rcpt arguments to the send function. In headers, e-mail diff --git a/doc/socket.html b/doc/socket.html index 5cc7157..54b12cb 100644 --- a/doc/socket.html +++ b/doc/socket.html @@ -80,12 +80,12 @@ socket.connect(address, port [, locaddr, locport]) This function is a shortcut that creates and returns a TCP client object connected to a remote host at a given port. Optionally, the user can also specify the local address and port to bind -(locaddr and locport). +(locaddr and locport).

    -

    +

    socket._DEBUG

    @@ -372,7 +372,7 @@ c = socket.try(socket.connect("localhost", 80)) -

    +

    socket._VERSION

    diff --git a/doc/tcp.html b/doc/tcp.html index ae8efd5..5c810de 100644 --- a/doc/tcp.html +++ b/doc/tcp.html @@ -79,7 +79,7 @@ reported by nil followed by a message describing the error.

    Note: calling socket.select with a server object in -the receive parameter before a call to accept does +the recvt parameter before a call to accept does not guarantee accept will return immediately. Use the settimeout method or accept might block until another client shows up. @@ -111,7 +111,7 @@ method returns nil followed by an error message.

    Note: The function socket.bind -is available and is a shortcut for the creation server sockets. +is available and is a shortcut for the creation of server sockets.

    @@ -173,8 +173,11 @@ is available and is a shortcut for the creation of client sockets.

    Note: Starting with LuaSocket 2.0, the settimeout -method affects the behavior of connect, causing it to return in case of -a timeout. +method affects the behavior of connect, causing it to return +with an error in case of a timeout. If that happens, you can still call socket.select with the socket in the +sendt table. The socket will be writable when the connection is +stablished.

    @@ -328,11 +331,11 @@ substring to be sent.

    -If successful, the method returns the number of bytes accepted by -the transport layer. In case of error, the method returns +If successful, the method returns the number of bytes sent. +In case of error, the method returns nil, followed by an error message, followed by the -partial number of bytes accepted by the transport layer. -The error message can be 'closed' in case +index of the first character within [i, j] that has not been sent yet +(you might want to try again from then on). The error message can be 'closed' in case the connection was closed before the transmission was completed or the string 'timeout' in case there was a timeout during the operation. @@ -433,7 +436,7 @@ 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 +Age is the new age in seconds.

    -- cgit v1.2.3-55-g6feb