Final push for release...

This commit is contained in:
Diego Nehab 2005-08-12 05:56:32 +00:00
parent 37f7af4b9f
commit 0c3cdd5ef2
31 changed files with 332 additions and 255 deletions

View file

@ -106,6 +106,7 @@ ftp.<b>get{</b><br>
&nbsp;&nbsp;[port = <i>number</i>,]<br>
&nbsp;&nbsp;[type = <i>string</i>,]<br>
&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br>
&nbsp;&nbsp;[create = <i>function</i>]<br>
<b>}</b>
</p>
@ -138,7 +139,9 @@ authentication. Defaults to "<tt>ftp:anonymous@anonymous.org</tt>";
<li><tt>step</tt>:
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
pump step function used to pass data from the
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function.
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;
<li><tt>accept</tt>: An optional function to be used instead of
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
</ul>
<p class=return>
@ -188,6 +191,7 @@ ftp.<b>put{</b><br>
&nbsp;&nbsp;[port = <i>number</i>,]<br>
&nbsp;&nbsp;[type = <i>string</i>,]<br>
&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br>
&nbsp;&nbsp;[create = <i>function</i>]<br>
<b>}</b>
</p>
@ -220,7 +224,9 @@ authentication. Defaults to "<tt>ftp:anonymous@anonymous.org</tt>";
<li><tt>step</tt>:
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
pump step function used to pass data from the
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function.
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;
<li><tt>accept</tt>: An optional function to be used instead of
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
</ul>
<p class=return>

View file

@ -131,7 +131,8 @@ http.<b>request{</b><br>
&nbsp;&nbsp;[source = <i>LTN12 source</i>],<br>
&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br>
&nbsp;&nbsp;[proxy = <i>string</i>,]<br>
&nbsp;&nbsp;[redirect = <i>boolean</i>]<br>
&nbsp;&nbsp;[redirect = <i>boolean</i>,]<br>
&nbsp;&nbsp;[create = <i>function</i>]<br>
<b>}</b>
</p>
@ -178,7 +179,9 @@ pump step function used to move data.
Defaults to the LTN12 <tt>pump.step</tt> function.
<li><tt>proxy</tt>: The URL of a proxy server to use. Defaults to no proxy;
<li><tt>redirect</tt>: Set to <tt><b>false</b></tt> to prevent the
function from automatically following 301 or 302 server redirect messages.
function from automatically following 301 or 302 server redirect messages;
<li><tt>accept</tt>: An optional function to be used instead of
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
</ul>
<p class=return>

View file

@ -168,6 +168,7 @@ support.
<li> Improved: <tt>tcp:send(data, i, j)</tt> to return <tt>(i+sent-1)</tt>. This is great for non-blocking I/O, but might break some code;
<li> Improved: HTTP, SMTP, and FTP functions to accept a new field
<tt>create</tt> that overrides the function used to create socket objects;
<li> Fixed: <tt>smtp.send</tt> was hanging on errors returned by LTN12 sources;
<li> Fixed: <tt>url.absolute()</tt> to work when <tt>base_url</tt> is in
parsed form;
<li> Fixed: <tt>http.request()</tt> not to redirect when the location
@ -194,7 +195,8 @@ with descriptor 0 to be ignored (Renato Maia);
<li> Fixed: "Bug" that caused <tt>gethostbyname</tt> to crash under VMS
(Renato Maia);
<li> Fixed: <tt>tcp:send("")</tt> to return 0 bytes sent (Alexander Marinov);
<li> Improved: <tt>socket.DEBUG</tt> and <tt>socket.VERSION</tt> became <tt>socket._DEBUGs</tt> and <tt>socket._VERSION</tt> for uniformity with other libraries.
<li> Improved: <tt>socket.DEBUG</tt> and <tt>socket.VERSION</tt> became <tt>socket._DEBUGs</tt> and <tt>socket._VERSION</tt> for uniformity with other libraries;
<li> Improved: <tt>socket.select</tt> now works on empty sets on Windows.
</ul>
<!-- incompatible +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

View file

@ -71,11 +71,11 @@ Here is the standard LuaSocket distribution directory structure:</p>
<pre class=example>
&lt;ROOT&gt;/compat-5.1.lua
&lt;ROOT&gt;/socket.lua
&lt;ROOT&gt;/lsocket.dll
&lt;ROOT&gt;/mime.lua
&lt;ROOT&gt;/lmime.dll
&lt;ROOT&gt;/ltn12.lua
&lt;ROOT&gt;/mime/init.lua
&lt;ROOT&gt;/mime/core.dll
&lt;ROOT&gt;/socket/init.lua
&lt;ROOT&gt;/socket/core.dll
&lt;ROOT&gt;/socket/http.lua
&lt;ROOT&gt;/socket/tp.lua
&lt;ROOT&gt;/socket/ftp.lua
@ -83,10 +83,8 @@ Here is the standard LuaSocket distribution directory structure:</p>
&lt;ROOT&gt;/socket/url.lua
</pre>
<p> Naturally, on Unix systems, <tt>lsocket.dll</tt> and <tt>lmime.dll</tt>
would be replaced by <tt>lsocket.so</tt> and <tt>lmime.so</tt>. In Mac OS
X, they would be replaced by <tt>lsocket.dylib</tt> and
<tt>lmime.dylib</tt>. </p>
<p> Naturally, on Unix systems, <tt>core.dll</tt>
would be replaced by <tt>core.so</tt>.
<p> In order for the interpreter to find all LuaSocket components, three
environment variables need to be set. The first environment variable tells

View file

@ -142,7 +142,7 @@ Support, Manual">
<blockquote>
<a href="socket.html">Socket</a>
<blockquote>
<a href="socket.html#_debug">_DEBUG</a>,
<a href="socket.html#debug">_DEBUG</a>,
<a href="dns.html#dns">dns</a>,
<a href="socket.html#gettime">gettime</a>,
<a href="socket.html#newtry">newtry</a>,
@ -155,7 +155,7 @@ Support, Manual">
<a href="tcp.html#tcp">tcp</a>,
<a href="socket.html#try">try</a>,
<a href="udp.html#udp">udp</a>,
<a href="socket.html#_version">_VERSION</a>.
<a href="socket.html#version">_VERSION</a>.
</blockquote>
</blockquote>

View file

@ -127,6 +127,7 @@ smtp.<b>send{</b><br>
&nbsp;&nbsp;[port = <i>number</i>,]<br>
&nbsp;&nbsp;[domain = <i>string</i>,]<br>
&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br>
&nbsp;&nbsp;[create = <i>function</i>]<br>
<b>}</b>
</p>
@ -138,6 +139,7 @@ doesn't have a simple interface. However, see the
a very powerful way to define the message contents.
</p>
<p class=parameters>
The sender is given by the e-mail address in the <tt>from</tt> field.
<tt>Rcpt</tt> is a Lua table with one entry for each recipient e-mail
@ -158,7 +160,9 @@ local machine host name;
<li> <tt>step</tt>:
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
pump step function used to pass data from the
source to the server. Defaults to the LTN12 <tt>pump.step</tt> function.
source to the server. Defaults to the LTN12 <tt>pump.step</tt> function;
<li><tt>accept</tt>: An optional function to be used instead of
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
</ul>
<p class=return>
@ -167,7 +171,7 @@ If successful, the function returns 1. Otherwise, the function returns
</p>
<p class=note>
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
"<tt>&lt;fulano@example.com&gt;</tt>" in the <tt>from</tt> and
<tt>rcpt</tt> arguments to the <tt>send</tt> function. In headers, e-mail

View file

@ -80,12 +80,12 @@ socket.<b>connect(</b>address, port [, locaddr, locport]<b>)</b>
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 user can also specify the local address and port to bind
(<tt>locaddr</tt> and </tt>locport</tt>).
(<tt>locaddr</tt> and <tt>locport</tt>).
</p>
<!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<p class=name id=_debug>
<p class=name id=debug>
socket.<b>_DEBUG</b>
</p>
@ -372,7 +372,7 @@ c = socket.try(socket.connect("localhost", 80))
<!-- version ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<p class=name id=_version>
<p class=name id=version>
socket.<b>_VERSION</b>
</p>

View file

@ -79,7 +79,7 @@ reported by <b><tt>nil</tt></b> followed by a message describing the error.
<p class=note>
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
the <tt>recvt</tt> parameter before a call to <tt>accept</tt> does
<em>not</em> guarantee <tt>accept</tt> will return immediately. Use the <a
href=#settimeout><tt>settimeout</tt></a> method or <tt>accept</tt>
might block until <em>another</em> client shows up.
@ -111,7 +111,7 @@ method returns <b><tt>nil</tt></b> followed by an error message.
<p class=note>
Note: The function <a href=socket.html#bind><tt>socket.bind</tt></a>
is available and is a shortcut for the creation server sockets.
is available and is a shortcut for the creation of server sockets.
</p>
<!-- close ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@ -173,8 +173,11 @@ is available and is a shortcut for the creation of client sockets.
<p class=note>
Note: Starting with LuaSocket 2.0,
the <a href=#settimeout><tt>settimeout</tt></a>
method affects the behavior of connect, causing it to return in case of
a timeout.
method affects the behavior of <tt>connect</tt>, causing it to return
with an error in case of a timeout. If that happens, you can still call <a
href=socket.html#select><tt>socket.select</tt></a> with the socket in the
<tt>sendt</tt> table. The socket will be writable when the connection is
stablished.
</p>
<!-- getpeername ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@ -328,11 +331,11 @@ substring to be sent.
</p>
<p class=return>
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
<b><tt>nil</tt></b>, followed by an error message, followed by the
partial number of bytes accepted by the transport layer.
The error message can be '<tt>closed</tt>' in case
index of the first character within <tt>[i, j]</tt> that has not been sent yet
(you might want to try again from then on). The error message can be '<tt>closed</tt>' in case
the connection was closed before the transmission was completed or the
string '<tt>timeout</tt>' in case there was a timeout during the
operation.
@ -433,7 +436,7 @@ of bandwidth.
<p class=parameters>
<tt>Received</tt> is a number with the new number of bytes received.
<tt>Sent</tt> is a number with the new number of bytes sent.
<tt>Age</tt> is the new age in seconds</tt>
<tt>Age</tt> is the new age in seconds.
</p>
<p class=return>