From bce1cb30d856d167e167c4c2997f9bebe03a612c Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Mon, 21 Jun 2004 06:07:58 +0000 Subject: More adjustments/bugfixes. --- doc/dns.html | 6 ++++-- doc/ftp.html | 10 +++++++--- doc/http.html | 6 ++++-- doc/index.html | 6 ++++-- doc/introduction.html | 8 +++++--- doc/ltn12.html | 7 +++++-- doc/mime.html | 8 +++++--- doc/reference.html | 6 ++++-- doc/smtp.html | 12 +++++++----- doc/socket.html | 20 ++++++++++++++++---- doc/tcp.html | 17 ++++++++++------- doc/udp.html | 12 ++++++++---- doc/url.html | 12 +++++++----- 13 files changed, 86 insertions(+), 44 deletions(-) (limited to 'doc') diff --git a/doc/dns.html b/doc/dns.html index 47134d8..09a9bdb 100644 --- a/doc/dns.html +++ b/doc/dns.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: DNS support @@ -16,7 +18,7 @@
diff --git a/doc/ftp.html b/doc/ftp.html index fe514e9..158b402 100644 --- a/doc/ftp.html +++ b/doc/ftp.html @@ -1,7 +1,11 @@ - + + -LuaSocket: Network support for the Lua language + + +LuaSocket: FTP support @@ -14,7 +18,7 @@
-LuaSocket +LuaSocket
Network support for the Lua language
diff --git a/doc/http.html b/doc/http.html index 4780436..13acd1c 100644 --- a/doc/http.html +++ b/doc/http.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: HTTP support @@ -16,7 +18,7 @@
-LuaSocket +LuaSocket
Network support for the Lua language
diff --git a/doc/index.html b/doc/index.html index 0e9eb1d..abba703 100644 --- a/doc/index.html +++ b/doc/index.html @@ -3,6 +3,8 @@ + +LuaSocket: Network support for the Lua language @@ -16,7 +18,7 @@
-LuaSocket +LuaSocket
Network support for the Lua language
@@ -276,7 +278,7 @@ return convention WILL break old code; does not call listen anymore. It is the new listen method that turns a TCP object into a server object; -
  • socket.time became socket.gettime for uniformity; +
  • socket.time changed to socket.gettime for uniformity;
  • Interface to options has changed. diff --git a/doc/introduction.html b/doc/introduction.html index 2c738d6..6468148 100644 --- a/doc/introduction.html +++ b/doc/introduction.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: Introduction to the core @@ -16,7 +18,7 @@
  • -LuaSocket +LuaSocket
    Network support for the Lua language
    @@ -209,7 +211,7 @@ print("Please telnet to localhost on port " .. port) print("After connecting, you have 10s to enter a line to be echoed") -- loop forever waiting for clients while 1 do - -- wait for a conection from any client + -- wait for a connection from any client local client = server:accept() -- make sure we don't block waiting for this client's line client:settimeout(10) diff --git a/doc/ltn12.html b/doc/ltn12.html index bfb9b51..40dcf96 100644 --- a/doc/ltn12.html +++ b/doc/ltn12.html @@ -3,7 +3,10 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: LTN12 module @@ -16,7 +19,7 @@
    -LuaSocket +LuaSocket
    Network support for the Lua language
    diff --git a/doc/mime.html b/doc/mime.html index 0f4ffa8..6758a4b 100644 --- a/doc/mime.html +++ b/doc/mime.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: MIME module @@ -16,7 +18,7 @@
    -LuaSocket +LuaSocket
    Network support for the Lua language
    @@ -92,7 +94,7 @@ The function returns a filter that performs the conversion. Note: There is no perfect solution to this problem. Different end-of-line markers are an evil that will probably plague developers forever. This function, however, will work perfectly for text created with any of -the most common end-of-line markers, i.e. the MacOS (CR), the Unix (LF), +the most common end-of-line markers, i.e. the Mac OS (CR), the Unix (LF), or the DOS (CRLF) conventions. Even if the data has mixed end-of-line markers, the function will still work well, although it doesn't guarantee that the number of empty lines will be correct. diff --git a/doc/reference.html b/doc/reference.html index 5c07c4d..8d129e3 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: Index to reference manual @@ -16,7 +18,7 @@
    -LuaSocket +LuaSocket
    Network support for the Lua language
    diff --git a/doc/smtp.html b/doc/smtp.html index 224dde3..b975045 100644 --- a/doc/smtp.html +++ b/doc/smtp.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: SMTP support @@ -16,7 +18,7 @@
    -LuaSocket +LuaSocket
    Network support for the Lua language
    @@ -48,7 +50,7 @@ control (if you bother to read the code). Another RFC of interest is RFC 2822, which governs the Internet Message Format. -Multipart messages (those that contain attatchments) are part +Multipart messages (those that contain attachments) are part of the MIME standard, but described mainly in RFC 2046 @@ -98,7 +100,7 @@ in representing them in a Lua table.

    -The following constants can be set to control the default behaviour of +The following constants can be set to control the default behavior of the SMTP module:

    @@ -256,7 +258,7 @@ mesgt = { to = "Fulano da Silva <fulano@example.com>", cc = '"Beltrano F. Nunes" <beltrano@example.com>', subject = "My first message" - } + }, body = "I hope this works. If it does, I can send you another 1000 copies." } diff --git a/doc/socket.html b/doc/socket.html index 1bbeb7f..129b134 100644 --- a/doc/socket.html +++ b/doc/socket.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: The socket namespace @@ -16,7 +18,7 @@
    -LuaSocket +LuaSocket
    Network support for the Lua language
    @@ -55,6 +57,16 @@ socket.bind(address, port [, backlog])

    +This function is a shortcut that creates and returns a TCP server object +bound to a local address and port, ready to +accept client connections. Optionally, +user can also specify the backlog argument to the +listen method (defaults to 32). +

    + +

    +Note: The server object returned will have the option "reuseaddr" +set to true.

    @@ -64,9 +76,9 @@ socket.connect(address, port [, locaddr, locport])

    -This function is a shortcut that creates and returns a TCP socket object +This function is a shortcut that creates and returns a TCP client object connected to a remote host at a given port. Optionally, -the use can also specify the local address and port to bind +the user can also specify the local address and port to bind (locaddr and locport).

    diff --git a/doc/tcp.html b/doc/tcp.html index 37b0b56..5c0da75 100644 --- a/doc/tcp.html +++ b/doc/tcp.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: TCP/IP support @@ -16,7 +18,7 @@
    -LuaSocket +LuaSocket
    Network support for the Lua language
    @@ -74,7 +76,7 @@ reported by nil followed by a message describing the error.

    -Note: calling socket.select +Note: calling socket.select with a server object in the receive parameter before a call to accept does not guarantee accept will return immediately. Use the nil followed by an error message.

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

    @@ -163,15 +165,15 @@ describing the error. In case of success, the method returns 1.

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

    Note: Starting with LuaSocket 2.0, the settimeout -function affects the behavior of connect, causing it to return in case of -a timeout error. +method affects the behavior of connect, causing it to return in case of +a timeout.

    @@ -197,6 +199,7 @@ Note: It makes no sense to call this method on server objects.

    +master:getsockname()
    client:getsockname()
    server:getsockname()

    diff --git a/doc/udp.html b/doc/udp.html index 69895ce..75d1d9e 100644 --- a/doc/udp.html +++ b/doc/udp.html @@ -1,10 +1,14 @@ + "http://www.w3.org/TR/html4/strict.dtd"> + -LuaSocket: Network support for the Lua language + + +LuaSocket: UDP support + @@ -14,7 +18,7 @@
    -LuaSocket +LuaSocket
    Network support for the Lua language
    @@ -240,7 +244,7 @@ unconnected:setpeername(address, port)

    Changes the peer of a UDP object. This method turns an unconnected UDP object into a connected UDP -object or vice-versa. +object or vice versa.

    diff --git a/doc/url.html b/doc/url.html index 207995c..92acf36 100644 --- a/doc/url.html +++ b/doc/url.html @@ -3,7 +3,9 @@ -LuaSocket: Network support for the Lua language + + +LuaSocket: URL support @@ -16,7 +18,7 @@

    -LuaSocket +LuaSocket
    Network support for the Lua language
    @@ -135,7 +137,7 @@ Rebuilds an URL from its parts. Parsed_url is a table with same components returned by parse. Lower level components, if specified, -take precedence over hight level components of the URL grammar. +take precedence over high level components of the URL grammar.

    @@ -279,8 +281,8 @@ Breaks a <path> URL component into all its

    Since some characters are reserved in URLs, they must be escaped whenever present in a <path> component. Therefore, before -returning a list with all the parsed segments, the function unescapes all -of them. +returning a list with all the parsed segments, the function removes +escaping from all of them.

    -- cgit v1.2.3-55-g6feb
    -LuaSocket +LuaSocket
    Network support for the Lua language