More adjustments/bugfixes.

This commit is contained in:
Diego Nehab 2004-06-21 06:07:58 +00:00
parent f7579db9e8
commit bce1cb30d8
33 changed files with 135 additions and 96 deletions

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: DNS support">
<meta name="keywords" content="Lua, Library, DNS, Network, Support">
<title>LuaSocket: DNS support</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>

View file

@ -1,7 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: FTP support">
<meta name="keywords" content="Lua, Library, FTP, Network, Support">
<title>LuaSocket: FTP support</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -14,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: HTTP support">
<meta name="keywords" content="Lua, Library, HTTP, WWW, browser, Network, Support">
<title>LuaSocket: HTTP support</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>

View file

@ -3,6 +3,8 @@
<html>
<head>
<meta name="description" content="The LuaSocket Homepage">
<meta name="keywords" content="Lua, Library, Network, Support, Internet">
<title>LuaSocket: Network support for the Lua language </title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -276,7 +278,7 @@ return convention WILL break old code;
does not call <tt>listen</tt> anymore. It is the new <tt>listen</tt>
method that turns a TCP object into a server object;
<li> <tt>socket.time</tt> became <tt>socket.gettime</tt> for uniformity;
<li> <tt>socket.time</tt> changed to <tt>socket.gettime</tt> for uniformity;
<li> Interface to options has changed.

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: Introduction to the core">
<meta name="keywords" content="Lua, Library, TCP, UDP, Network, Support">
<title>LuaSocket: Introduction to the core</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -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)

View file

@ -3,7 +3,10 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: LTN12 support">
<meta name="keywords" content="Lua, Library, Filters, Source, Sink,
Pump, Support">
<title>LuaSocket: LTN12 module</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +19,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: MIME support">
<meta name="keywords" content="Lua, Library, MIME, Support">
<title>LuaSocket: MIME module</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -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.

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language </title>
<meta name="description" content="LuaSocket: Index to reference manual">
<meta name="keywords" content="Lua, Library, Index, Manual, Network, Support">
<title>LuaSocket: Index to reference manual</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: SMTP support">
<meta name="keywords" content="Lua, Library, SMTP, e-mail, MIME, Multipart, Support">
<title>LuaSocket: SMTP support</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -48,7 +50,7 @@ control (if you bother to read the code).
Another RFC of interest is <a
href="http://www.cs.princeton.edu/~diego/rfc/rfc2822.txt">RFC 2822</a>,
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 <a href="http://www.cs.princeton.edu/~diego/rfc/rfc2046.txt">RFC
2046</a>
@ -98,7 +100,7 @@ in representing them in a Lua table.
</p>
<p>
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:
</p>
@ -256,7 +258,7 @@ mesgt = {
to = "Fulano da Silva &lt;fulano@example.com&gt;",
cc = '"Beltrano F. Nunes" &lt;beltrano@example.com&gt;',
subject = "My first message"
}
},
body = "I hope this works. If it does, I can send you another 1000 copies."
}

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: The core namespace">
<meta name="keywords" content="Lua, Library, socket, Network, Support">
<title>LuaSocket: The socket namespace</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -55,6 +57,16 @@ socket.<b>bind(</b>address, port [, backlog]<b>)</b>
</p>
<p class=description>
This function is a shortcut that creates and returns a TCP server object
bound to a local <tt>address</tt> and <tt>port</tt>, ready to
accept client connections. Optionally,
user can also specify the <tt>backlog</tt> argument to the
<a href=tcp.html#listen><tt>listen</tt></a> method (defaults to 32).
</p>
<p class=note>
Note: The server object returned will have the option "<tt>reuseaddr</tt>"
set to <tt><b>true</b></tt>.
</p>
<!-- connect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@ -64,9 +76,9 @@ socket.<b>connect(</b>address, port [, locaddr, locport]<b>)</b>
</p>
<p class=description>
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 <tt>host</tt> at a given <tt>port</tt>. 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
(<tt>locaddr</tt> and </tt>locport</tt>).
</p>

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: The TCP/IP support">
<meta name="keywords" content="Lua, Library, socket, TCP, Network, Support">
<title>LuaSocket: TCP/IP support</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -74,7 +76,7 @@ reported by <b><tt>nil</tt></b> followed by a message describing the error.
</p>
<p class=note>
Note: calling <a href=sockett.html#select><tt>socket.select</tt></a>
Note: calling <a href=socket.html#select><tt>socket.select</tt></a>
with a server object in
the <tt>receive</tt> parameter before a call to <tt>accept</tt> does
<em>not</em> guarantee <tt>accept</tt> will return immediately. Use the <a
@ -107,7 +109,7 @@ method returns <b><tt>nil</tt></b> followed by an error message.
</p>
<p class=note>
Note: The function <a href=#socket.bind><tt>socket.bind</tt></a>
Note: The function <a href=socket.html#bind><tt>socket.bind</tt></a>
is available and is a shortcut for the creation server sockets.
</p>
@ -163,15 +165,15 @@ describing the error. In case of success, the method returns 1.
</p>
<p class=note>
Note: The function <a href=#socket.connect><tt>socket.connect</tt></a>
Note: The function <a href=socket.html#connect><tt>socket.connect</tt></a>
is available and is a shortcut for the creation of client sockets.
</p>
<p class=note>
Note: Starting with LuaSocket 2.0,
the <a href=#settimeout><tt>settimeout</tt></a>
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.
</p>
<!-- getpeername ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@ -197,6 +199,7 @@ Note: It makes no sense to call this method on server objects.
<!-- getpeername ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<p class=name id=getsockname>
master:<b>getsockname()</b><br>
client:<b>getsockname()</b><br>
server:<b>getsockname()</b>
</p>

View file

@ -1,10 +1,14 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: The UDP support">
<meta name="keywords" content="Lua, Library, socket, UDP, Network, Support">
<title>LuaSocket: UDP support</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
<body>
<!-- header ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@ -14,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -240,7 +244,7 @@ unconnected:<b>setpeername(</b>address, port<b>)</b>
<p class="description">
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.
</p>
<p class="description">

View file

@ -3,7 +3,9 @@
<html>
<head>
<title>LuaSocket: Network support for the Lua language</title>
<meta name="description" content="LuaSocket: URL manipulation">
<meta name="keywords" content="Lua, Library, URL, link, Network, Support">
<title>LuaSocket: URL support</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>
@ -16,7 +18,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -135,7 +137,7 @@ Rebuilds an URL from its parts.
<tt>Parsed_url</tt> is a table with same components returned by
<a href="#parse"><tt>parse</tt></a>.
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.
</p>
<p class=return>
@ -279,8 +281,8 @@ Breaks a <tt>&lt;path&gt;</tt> URL component into all its
<p class=return>
Since some characters are reserved in URLs, they must be escaped
whenever present in a <tt>&lt;path&gt;</tt> 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.
</p>
<!-- unescape +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->