aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2009-05-27 09:31:38 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2009-05-27 09:31:38 +0000
commitbce60be30fe8e9c1b0eb33128c23c93d7bca5303 (patch)
tree3927343c777fcb7764a0f2f89754a0ceab141c21 /doc
parentd1a72435d5bd3528f3c334cd4d1da16dcead47bf (diff)
downloadluasocket-bce60be30fe8e9c1b0eb33128c23c93d7bca5303.tar.gz
luasocket-bce60be30fe8e9c1b0eb33128c23c93d7bca5303.tar.bz2
luasocket-bce60be30fe8e9c1b0eb33128c23c93d7bca5303.zip
Decent makefiles!
Diffstat (limited to 'doc')
-rw-r--r--doc/dns.html8
-rw-r--r--doc/ftp.html8
-rw-r--r--doc/http.html8
-rw-r--r--doc/index.html77
-rw-r--r--doc/installation.html8
-rw-r--r--doc/introduction.html8
-rw-r--r--doc/ltn12.html8
-rw-r--r--doc/mime.html8
-rw-r--r--doc/reference.html9
-rw-r--r--doc/smtp.html8
-rw-r--r--doc/socket.html56
-rw-r--r--doc/tcp.html16
-rw-r--r--doc/udp.html8
-rw-r--r--doc/url.html8
14 files changed, 121 insertions, 117 deletions
diff --git a/doc/dns.html b/doc/dns.html
index f4c3b07..a38e368 100644
--- a/doc/dns.html
+++ b/doc/dns.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="installation.html">installation</a> &middot; 29<a href="installation.html">installation</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -113,8 +113,8 @@ message.
113<hr> 113<hr>
114<center> 114<center>
115<p class=bar> 115<p class=bar>
116<a href="home.html">home</a> &middot; 116<a href="index.html">home</a> &middot;
117<a href="home.html#down">download</a> &middot; 117<a href="index.html#down">download</a> &middot;
118<a href="installation.html">installation</a> &middot; 118<a href="installation.html">installation</a> &middot;
119<a href="introduction.html">introduction</a> &middot; 119<a href="introduction.html">introduction</a> &middot;
120<a href="reference.html">reference</a> 120<a href="reference.html">reference</a>
diff --git a/doc/ftp.html b/doc/ftp.html
index 9884f31..1f6335e 100644
--- a/doc/ftp.html
+++ b/doc/ftp.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="installation.html">installation</a> &middot; 29<a href="installation.html">installation</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -270,8 +270,8 @@ f, e = ftp.put{
270<hr> 270<hr>
271<center> 271<center>
272<p class=bar> 272<p class=bar>
273<a href="home.html">home</a> &middot; 273<a href="index.html">home</a> &middot;
274<a href="home.html#download">download</a> &middot; 274<a href="index.html#download">download</a> &middot;
275<a href="installation.html">installation</a> &middot; 275<a href="installation.html">installation</a> &middot;
276<a href="introduction.html">introduction</a> &middot; 276<a href="introduction.html">introduction</a> &middot;
277<a href="reference.html">reference</a> 277<a href="reference.html">reference</a>
diff --git a/doc/http.html b/doc/http.html
index 0acac13..a274aef 100644
--- a/doc/http.html
+++ b/doc/http.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="introduction.html">introduction</a> &middot; 29<a href="introduction.html">introduction</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -314,8 +314,8 @@ r, c = http.request {
314<hr> 314<hr>
315<center> 315<center>
316<p class=bar> 316<p class=bar>
317<a href="home.html">home</a> &middot; 317<a href="index.html">home</a> &middot;
318<a href="home.html#download">download</a> &middot; 318<a href="index.html#download">download</a> &middot;
319<a href="installation.html">installation</a> &middot; 319<a href="installation.html">installation</a> &middot;
320<a href="introduction.html">introduction</a> &middot; 320<a href="introduction.html">introduction</a> &middot;
321<a href="reference.html">reference</a> 321<a href="reference.html">reference</a>
diff --git a/doc/index.html b/doc/index.html
index 57a7907..5b54c59 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="installation.html">installation</a> &middot; 29<a href="installation.html">installation</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -87,7 +87,7 @@ Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a>
87<h2 id=download>Download</h2> 87<h2 id=download>Download</h2>
88 88
89<p> 89<p>
90LuaSocket version 2.0.2 is now available for download! It is 90LuaSocket version 2.0.3 is now available for download! It is
91compatible with Lua&nbsp;5.1, and has 91compatible with Lua&nbsp;5.1, and has
92been tested on Windows&nbsp;XP, Linux, and Mac OS X. Chances 92been tested on Windows&nbsp;XP, Linux, and Mac OS X. Chances
93are it works well on most UNIX distributions and Windows flavors. 93are it works well on most UNIX distributions and Windows flavors.
@@ -118,14 +118,15 @@ manual to find out how to properly install the library.
118<h2 id=thanks>Special thanks</h2> 118<h2 id=thanks>Special thanks</h2>
119 119
120<p> 120<p>
121Throughout LuaSocket's history, many people gave suggestions that helped 121Throughout LuaSocket's history, many people gave suggestions
122improve it. For that, I thank the Lua community. 122that helped improve it. For that, I thank the Lua community.
123Special thanks go to 123Special thanks go to David Burgess, who has helped push the
124David Burgess, who has helped push the library to a new level of quality and 124library to a new level of quality and from whom I have
125from whom I have learned a lot of stuff that doesn't show up in RFCs. 125learned a lot of stuff that doesn't show up in RFCs.
126Special thanks also to Carlos Cassino, who played a big part in the 126Special thanks also to Carlos Cassino, who played a big part
127extensible design seen in the C core of LuaSocket 2.0. Mike Pall 127in the extensible design seen in the C core of LuaSocket
128has been helping a lot too! Thanks to you all! 1282.0. Mike Pall has been helping a lot too! Thanks to you
129all!
129</p> 130</p>
130 131
131<!-- whatsnew +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 132<!-- whatsnew +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -133,44 +134,26 @@ has been helping a lot too! Thanks to you all!
133<h2 id=new>What's New</h2> 134<h2 id=new>What's New</h2>
134 135
135<p> 136<p>
1362.0.2 is just a bug-fix/update release. 1372.0.3 is just a bug-fix/update release.
137</p> 138</p>
138 139
139<ul> 140<ul>
140<li> Improved: http.request() now supports deprecated 141<li> Fixed: multicast didn't work on Windows, or anywhere
141HTTP/0.9 servers (Florian Berger); 142 else for that matter (Herbert Leuwer, Adrian Sietsma)
142<li> Fixed: could return "timedout" instead of "timeout" (Leo Leo); 143<li> Fixed: select() now reports an error when called with more
143<li> Fixed: crash when reading '*a' on closed socket (Paul Ducklin); 144 sockets than FD_SETSIZE (Lorenzo Leonini)
144<li> Fixed: return values are consistent when reading from closed sockets; 145<li> Fixed: manual links to home.html changed to index.html (Robert Hahn)
145<li> Fixed: case sensitivity in headers of multipart 146<li> Fixed: mime.unb64() would return an empty string on results that started
146messages in smtp.message() (Graham Henstridge); 147 with a null character (Robert Raschke)
147<li> Fixed a couple instances of error() being called instead of 148<li> Fixed: HTTP now automatically redirects on 303 and 307 (Jonathan Gray)
148base.error(). These would cause an error when an error was 149<li> Fixed: calling sleep() with negative numbers could
149reported :) (Ketmar Dark); 150 block forever, wasting CPU. Now it returns immediately (MPB);
150<li> Fixed: test script now uses pairs() iterator instead 151<li> Improved: FTP commands are now sent in upper case to
151of the old Lua syntax (Robert Dodier). 152 help buggy servers (Anders Eurenius)
152</ul> 153<li> Improved: known headers now sent in canonic
153 154 capitalization to help buggy servers (Joseph Stewart);
154<p> 155<li> Improved: Clarified tcp:receive() in the manual (MPB);
1552.0.1 is just a bug-fix/update release. 156<li> Improved: Decent makefiles (LHF).
156</p>
157
158<ul>
159<li> Updated: now using <tt>compat-5.1r5</tt>;
160<li> Improved: <tt>http.request</tt> is more robust to
161malformed URLs (Adrian Sietsma);
162<li> Improved: the simple <tt>http.request</tt> interface sends a
163"<tt>Content-type: application/x-www-form-urlencoded</tt>"
164header (William Trenker);
165<li> Improved: <tt>http.request</tt> is robust to evil
166servers that send inappropriate 100-continue messages
167(David Burgess);
168<li> Fixed: <tt>http.request</tt> was using the old host header during
169redirects (Florian Berger);
170<li> Fixed: sample <tt>unix.c</tt> had fallen through the
171cracks during development (Matthew Percival);
172<li> Fixed: error code was not being propagated correctly in
173ftp.lua (David Burgess).
174</ul> 157</ul>
175 158
176<!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 159<!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -190,7 +173,7 @@ still available for those that have compatibility issues.
190<hr> 173<hr>
191<center> 174<center>
192<p class=bar> 175<p class=bar>
193<a href="home.html#download">download</a> &middot; 176<a href="index.html#download">download</a> &middot;
194<a href="installation.html">installation</a> &middot; 177<a href="installation.html">installation</a> &middot;
195<a href="introduction.html">introduction</a> &middot; 178<a href="introduction.html">introduction</a> &middot;
196<a href="reference.html">reference</a> 179<a href="reference.html">reference</a>
diff --git a/doc/installation.html b/doc/installation.html
index 0288f4a..bb9a5bb 100644
--- a/doc/installation.html
+++ b/doc/installation.html
@@ -25,8 +25,8 @@ Installation">
25</td></tr> 25</td></tr>
26</table> 26</table>
27<p class=bar> 27<p class=bar>
28<a href="home.html">home</a> &middot; 28<a href="index.html">home</a> &middot;
29<a href="home.html#download">download</a> &middot; 29<a href="index.html#download">download</a> &middot;
30<a href="installation.html">installation</a> &middot; 30<a href="installation.html">installation</a> &middot;
31<a href="introduction.html">introduction</a> &middot; 31<a href="introduction.html">introduction</a> &middot;
32<a href="reference.html">reference</a> 32<a href="reference.html">reference</a>
@@ -144,8 +144,8 @@ Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio
144<hr> 144<hr>
145<center> 145<center>
146<p class=bar> 146<p class=bar>
147<a href="home.html">home</a> &middot; 147<a href="index.html">home</a> &middot;
148<a href="home.html#down">download</a> &middot; 148<a href="index.html#down">download</a> &middot;
149<a href="installation.html">installation</a> &middot; 149<a href="installation.html">installation</a> &middot;
150<a href="introduction.html">introduction</a> &middot; 150<a href="introduction.html">introduction</a> &middot;
151<a href="reference.html">reference</a> 151<a href="reference.html">reference</a>
diff --git a/doc/introduction.html b/doc/introduction.html
index eff6367..fd22f48 100644
--- a/doc/introduction.html
+++ b/doc/introduction.html
@@ -25,8 +25,8 @@ Library, Support">
25</td></tr> 25</td></tr>
26</table> 26</table>
27<p class=bar> 27<p class=bar>
28<a href="home.html">home</a> &middot; 28<a href="index.html">home</a> &middot;
29<a href="home.html#download">download</a> &middot; 29<a href="index.html#download">download</a> &middot;
30<a href="installation.html">installation</a> &middot; 30<a href="installation.html">installation</a> &middot;
31<a href="introduction.html">introduction</a> &middot; 31<a href="introduction.html">introduction</a> &middot;
32<a href="reference.html">reference</a> 32<a href="reference.html">reference</a>
@@ -314,8 +314,8 @@ and many others are covered by the <a href=reference.html>reference manual</a>.
314<hr> 314<hr>
315<center> 315<center>
316<p class=bar> 316<p class=bar>
317<a href="home.html">home</a> &middot; 317<a href="index.html">home</a> &middot;
318<a href="home.html#down">download</a> &middot; 318<a href="index.html#down">download</a> &middot;
319<a href="installation.html">installation</a> &middot; 319<a href="installation.html">installation</a> &middot;
320<a href="introduction.html">introduction</a> &middot; 320<a href="introduction.html">introduction</a> &middot;
321<a href="reference.html">reference</a> 321<a href="reference.html">reference</a>
diff --git a/doc/ltn12.html b/doc/ltn12.html
index 0013950..7e2f49a 100644
--- a/doc/ltn12.html
+++ b/doc/ltn12.html
@@ -25,8 +25,8 @@ Pump, Support, Library">
25</td></tr> 25</td></tr>
26</table> 26</table>
27<p class=bar> 27<p class=bar>
28<a href="home.html">home</a> &middot; 28<a href="index.html">home</a> &middot;
29<a href="home.html#download">download</a> &middot; 29<a href="index.html#download">download</a> &middot;
30<a href="installation.html">installation</a> &middot; 30<a href="installation.html">installation</a> &middot;
31<a href="introduction.html">introduction</a> &middot; 31<a href="introduction.html">introduction</a> &middot;
32<a href="reference.html">reference</a> 32<a href="reference.html">reference</a>
@@ -411,8 +411,8 @@ Creates and returns a source that produces the contents of a
411<hr> 411<hr>
412<center> 412<center>
413<p class=bar> 413<p class=bar>
414<a href="home.html">home</a> &middot; 414<a href="index.html">home</a> &middot;
415<a href="home.html#down">download</a> &middot; 415<a href="index.html#down">download</a> &middot;
416<a href="installation.html">installation</a> &middot; 416<a href="installation.html">installation</a> &middot;
417<a href="introduction.html">introduction</a> &middot; 417<a href="introduction.html">introduction</a> &middot;
418<a href="reference.html">reference</a> 418<a href="reference.html">reference</a>
diff --git a/doc/mime.html b/doc/mime.html
index d7faf52..9844744 100644
--- a/doc/mime.html
+++ b/doc/mime.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="installation.html">installation</a> &middot; 29<a href="installation.html">installation</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -457,8 +457,8 @@ marker.
457<hr> 457<hr>
458<center> 458<center>
459<p class=bar> 459<p class=bar>
460<a href="home.html">home</a> &middot; 460<a href="index.html">home</a> &middot;
461<a href="home.html#down">download</a> &middot; 461<a href="index.html#down">download</a> &middot;
462<a href="installation.html">installation</a> &middot; 462<a href="installation.html">installation</a> &middot;
463<a href="introduction.html">introduction</a> &middot; 463<a href="introduction.html">introduction</a> &middot;
464<a href="reference.html">reference</a> 464<a href="reference.html">reference</a>
diff --git a/doc/reference.html b/doc/reference.html
index b329f57..31f6ecf 100644
--- a/doc/reference.html
+++ b/doc/reference.html
@@ -25,8 +25,8 @@ Support, Manual">
25</td></tr> 25</td></tr>
26</table> 26</table>
27<p class=bar> 27<p class=bar>
28<a href="home.html">home</a> &middot; 28<a href="index.html">home</a> &middot;
29<a href="home.html#download">download</a> &middot; 29<a href="index.html#download">download</a> &middot;
30<a href="installation.html">installation</a> &middot; 30<a href="installation.html">installation</a> &middot;
31<a href="introduction.html">introduction</a> &middot; 31<a href="introduction.html">introduction</a> &middot;
32<a href="reference.html">reference</a> 32<a href="reference.html">reference</a>
@@ -151,6 +151,7 @@ Support, Manual">
151<a href="socket.html#sink">sink</a>, 151<a href="socket.html#sink">sink</a>,
152<a href="socket.html#skip">skip</a>, 152<a href="socket.html#skip">skip</a>,
153<a href="socket.html#sleep">sleep</a>, 153<a href="socket.html#sleep">sleep</a>,
154<a href="socket.html#setsize">_SETSIZE</a>,
154<a href="socket.html#source">source</a>, 155<a href="socket.html#source">source</a>,
155<a href="tcp.html#tcp">tcp</a>, 156<a href="tcp.html#tcp">tcp</a>,
156<a href="socket.html#try">try</a>, 157<a href="socket.html#try">try</a>,
@@ -220,8 +221,8 @@ Support, Manual">
220<hr> 221<hr>
221<center> 222<center>
222<p class=bar> 223<p class=bar>
223<a href="home.html">home</a> &middot; 224<a href="index.html">home</a> &middot;
224<a href="home.html#down">download</a> &middot; 225<a href="index.html#down">download</a> &middot;
225<a href="installation.html">installation</a> &middot; 226<a href="installation.html">installation</a> &middot;
226<a href="introduction.html">introduction</a> &middot; 227<a href="introduction.html">introduction</a> &middot;
227<a href="reference.html">reference</a> 228<a href="reference.html">reference</a>
diff --git a/doc/smtp.html b/doc/smtp.html
index 27dd473..980b821 100644
--- a/doc/smtp.html
+++ b/doc/smtp.html
@@ -25,8 +25,8 @@ Library, Support">
25</td></tr> 25</td></tr>
26</table> 26</table>
27<p class=bar> 27<p class=bar>
28<a href="home.html">home</a> &middot; 28<a href="index.html">home</a> &middot;
29<a href="home.html#download">download</a> &middot; 29<a href="index.html#download">download</a> &middot;
30<a href="installation.html">installation</a> &middot; 30<a href="installation.html">installation</a> &middot;
31<a href="introduction.html">introduction</a> &middot; 31<a href="introduction.html">introduction</a> &middot;
32<a href="reference.html">reference</a> 32<a href="reference.html">reference</a>
@@ -398,8 +398,8 @@ r, e = smtp.send{
398<hr> 398<hr>
399<center> 399<center>
400<p class=bar> 400<p class=bar>
401<a href="home.html">home</a> &middot; 401<a href="index.html">home</a> &middot;
402<a href="home.html#down">download</a> &middot; 402<a href="index.html#down">download</a> &middot;
403<a href="installation.html">installation</a> &middot; 403<a href="installation.html">installation</a> &middot;
404<a href="introduction.html">introduction</a> &middot; 404<a href="introduction.html">introduction</a> &middot;
405<a href="reference.html">reference</a> 405<a href="reference.html">reference</a>
diff --git a/doc/socket.html b/doc/socket.html
index f096e4b..490ab50 100644
--- a/doc/socket.html
+++ b/doc/socket.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="installation.html">installation</a> &middot; 29<a href="installation.html">installation</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -94,6 +94,24 @@ This constant is set to <tt><b>true</b></tt> if the library was compiled
94with debug support. 94with debug support.
95</p> 95</p>
96 96
97<!-- get time +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
98
99<p class=name id=gettime>
100socket.<b>gettime()</b>
101</p>
102
103<p class=description>
104Returns the time in seconds, relative to the origin of the
105universe. You should subtract the values returned by this function
106to get meaningful values.
107</p>
108
109<pre class=example>
110t = socket.gettime()
111-- do stuff
112print(socket.gettime() - t .. " seconds elapsed")
113</pre>
114
97<!-- newtry +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 115<!-- newtry +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
98 116
99<p class=name id=newtry> 117<p class=name id=newtry>
@@ -200,6 +218,15 @@ changed status.
200</p> 218</p>
201 219
202<p class=note> 220<p class=note>
221<b>Note: </b>: <tt>select</tt> can monitor a limited number
222of sockets, as defined by the constant <tt>socket._SETSIZE</tt>. This
223number may be as high as 1024 or as low as 64 by default,
224depending on the system. It is usually possible to change this
225at compile time. Invoking <tt>select</tt> with a larger
226number of sockets will raise an error.
227</p>
228
229<p class=note>
203<b>Important note</b>: a known bug in WinSock causes <tt>select</tt> to fail 230<b>Important note</b>: a known bug in WinSock causes <tt>select</tt> to fail
204on non-blocking TCP sockets. The function may return a socket as 231on non-blocking TCP sockets. The function may return a socket as
205writable even though the socket is <em>not</em> ready for sending. 232writable even though the socket is <em>not</em> ready for sending.
@@ -288,8 +315,8 @@ Freezes the program execution during a given amount of time.
288</p> 315</p>
289 316
290<p class=parameters> 317<p class=parameters>
291<tt>Time</tt> is the number of seconds to sleep for. 318<tt>Time</tt> is the number of seconds to sleep for. If
292The function truncates <tt>time</tt> down to the nearest integer. 319<tt>time</tt> is negative, the function returns immediately.
293</p> 320</p>
294 321
295<!-- source +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 322<!-- source +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -324,24 +351,17 @@ side closes the connection.
324The function returns a source with the appropriate behavior. 351The function returns a source with the appropriate behavior.
325</p> 352</p>
326 353
327<!-- time ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 354<!-- setsize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
328 355
329<p class=name id=gettime> 356<p class=name id=setsize>
330socket.<b>gettime()</b> 357socket.<b>_SETSIZE</b>
331</p> 358</p>
332 359
333<p class=description> 360<p class=description>
334Returns the time in seconds, relative to the origin of the 361The maximum number of sockets that the <a
335universe. You should subtract the values returned by this function 362href=#select><tt>select</tt></a> function can handle.
336to get meaningful values.
337</p> 363</p>
338 364
339<pre class=example>
340t = socket.gettime()
341-- do stuff
342print(socket.gettime() - t .. " seconds elapsed")
343</pre>
344
345<!-- try ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 365<!-- try ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
346 366
347<p class=name id=try> 367<p class=name id=try>
@@ -386,8 +406,8 @@ This constant has a string describing the current LuaSocket version.
386<hr> 406<hr>
387<center> 407<center>
388<p class=bar> 408<p class=bar>
389<a href="home.html">home</a> &middot; 409<a href="index.html">home</a> &middot;
390<a href="home.html#down">download</a> &middot; 410<a href="index.html#down">download</a> &middot;
391<a href="installation.html">installation</a> &middot; 411<a href="installation.html">installation</a> &middot;
392<a href="introduction.html">introduction</a> &middot; 412<a href="introduction.html">introduction</a> &middot;
393<a href="reference.html">reference</a> 413<a href="reference.html">reference</a>
diff --git a/doc/tcp.html b/doc/tcp.html
index a16a09e..d1d2154 100644
--- a/doc/tcp.html
+++ b/doc/tcp.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="installation.html">installation</a> &middot; 29<a href="installation.html">installation</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -297,12 +297,12 @@ of any received data before return.
297 297
298<p class=return> 298<p class=return>
299If successful, the method returns the received pattern. In case of error, 299If successful, the method returns the received pattern. In case of error,
300the method returns <tt><b>nil</b></tt> followed by an error message which 300the method returns <tt><b>nil</b></tt> followed by an error
301can be the string '<tt>closed</tt>' in case the connection was 301message, followed by a (possibly empty) string containing
302the partial that was received. The error message can be
303the string '<tt>closed</tt>' in case the connection was
302closed before the transmission was completed or the string 304closed before the transmission was completed or the string
303'<tt>timeout</tt>' in case there was a timeout during the operation. 305'<tt>timeout</tt>' in case there was a timeout during the operation.
304Also, after the error message, the function returns the partial result of
305the transmission.
306</p> 306</p>
307 307
308<p class=note> 308<p class=note>
@@ -514,8 +514,8 @@ This function returns 1.
514<hr> 514<hr>
515<center> 515<center>
516<p class=bar> 516<p class=bar>
517<a href="home.html">home</a> &middot; 517<a href="index.html">home</a> &middot;
518<a href="home.html#down">download</a> &middot; 518<a href="index.html#down">download</a> &middot;
519<a href="installation.html">installation</a> &middot; 519<a href="installation.html">installation</a> &middot;
520<a href="introduction.html">introduction</a> &middot; 520<a href="introduction.html">introduction</a> &middot;
521<a href="reference.html">reference</a> 521<a href="reference.html">reference</a>
diff --git a/doc/udp.html b/doc/udp.html
index 688649d..eca881d 100644
--- a/doc/udp.html
+++ b/doc/udp.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="installation.html">installation</a> &middot; 29<a href="installation.html">installation</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -397,8 +397,8 @@ imperative nature obvious.
397<hr> 397<hr>
398<center> 398<center>
399<p class=bar> 399<p class=bar>
400<a href="home.html">home</a> &middot; 400<a href="index.html">home</a> &middot;
401<a href="home.html#download">download</a> &middot; 401<a href="index.html#download">download</a> &middot;
402<a href="installation.html">installation</a> &middot; 402<a href="installation.html">installation</a> &middot;
403<a href="introduction.html">introduction</a> &middot; 403<a href="introduction.html">introduction</a> &middot;
404<a href="reference.html">reference</a> 404<a href="reference.html">reference</a>
diff --git a/doc/url.html b/doc/url.html
index e87126f..303e05d 100644
--- a/doc/url.html
+++ b/doc/url.html
@@ -24,8 +24,8 @@
24</td></tr> 24</td></tr>
25</table> 25</table>
26<p class=bar> 26<p class=bar>
27<a href="home.html">home</a> &middot; 27<a href="index.html">home</a> &middot;
28<a href="home.html#download">download</a> &middot; 28<a href="index.html#download">download</a> &middot;
29<a href="installation.html">installation</a> &middot; 29<a href="installation.html">installation</a> &middot;
30<a href="introduction.html">introduction</a> &middot; 30<a href="introduction.html">introduction</a> &middot;
31<a href="reference.html">reference</a> 31<a href="reference.html">reference</a>
@@ -310,8 +310,8 @@ The function returns the decoded string.
310<hr> 310<hr>
311<center> 311<center>
312<p class=bar> 312<p class=bar>
313<a href="home.html">home</a> &middot; 313<a href="index.html">home</a> &middot;
314<a href="home.html#down">download</a> &middot; 314<a href="index.html#down">download</a> &middot;
315<a href="installation.html">installation</a> &middot; 315<a href="installation.html">installation</a> &middot;
316<a href="introduction.html">introduction</a> &middot; 316<a href="introduction.html">introduction</a> &middot;
317<a href="reference.html">reference</a> 317<a href="reference.html">reference</a>