In pre release mode!

This commit is contained in:
Diego Nehab 2005-11-20 08:56:19 +00:00
parent f20f4889bf
commit 5e09779c7f
13 changed files with 279 additions and 407 deletions

View file

@ -209,11 +209,16 @@ Here are a few examples with the simple interface:
<pre class=example>
-- load the http module
http = require("socket.http")
local io = require("io")
local http = require("socket.http")
local ltn12 = require("ltn12")
-- connect to server "www.tecgraf.puc-rio.br" and retrieves this manual
-- file from "/luasocket/http.html"
b = http.request("http://www.tecgraf.puc-rio.br/luasocket/http.html")
-- connect to server "www.cs.princeton.edu" and retrieves this manual
-- file from "~diego/professional/luasocket/http.html" and print it to stdout
http.request{
url = "http://www.cs.princeton.edu/~diego/professional/luasocket/http.html",
sink = ltn12.sink.file(io.stdout)
}
-- connect to server "www.example.com" and tries to retrieve
-- "/private/index.html". Fails because authentication is needed.

View file

@ -165,6 +165,13 @@ support.
</p>
<ul>
<li> New: sample module <tt>dispatch.lua</tt> implements a
coroutine based dispatcher;
<li> New: sample <tt>check-links.lua</tt> works
both in blocking and non-blocking mode using coroutines
(using the new dispatcher);
<li> New: sample <tt>forward.lua</tt> implements a coroutine
based forward server (using the new dispatcher);
<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;

View file

@ -76,9 +76,9 @@ distribution directory structure:</p>
<pre class=example>
&lt;SHARE&gt;/compat-5.1.lua
&lt;SHARE&gt;/ltn12.lua
&lt;SHARE&gt;/mime/init.lua (originally mime.lua)
&lt;SHARE&gt;/mime/mime.lua
&lt;LIB&gt;/mime/core.dll
&lt;SHARE&gt;/socket/init.lua (originally socket.lua)
&lt;SHARE&gt;/socket/socket.lua
&lt;LIB&gt;/socket/core.dll
&lt;SHARE&gt;/socket/http.lua
&lt;SHARE&gt;/socket/tp.lua
@ -88,9 +88,7 @@ distribution directory structure:</p>
</pre>
<p> Naturally, on Unix systems, <tt>core.dll</tt>
would be replaced by <tt>core.so</tt>. Notice that in the instalation,
<tt>socket.lua</tt> becomes <tt>socket/init.lua</tt>, and the same happens
with <tt>mime.lua</tt>, which becomes <tt>mime/init.lua</tt>.
would be replaced by <tt>core.so</tt>.
</p>
<p> In order for the interpreter to find all LuaSocket components, three

View file

@ -446,6 +446,7 @@ The method returns 1 in case of success and <tt><b>nil</b></tt> otherwise.
<!-- settimeout +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<p class=name id=settimeout>
master:<b>settimeout(</b>value [, mode]<b>)</b><br>
client:<b>settimeout(</b>value [, mode]<b>)</b><br>
server:<b>settimeout(</b>value [, mode]<b>)</b>
</p>