aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-08-12 05:56:32 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-08-12 05:56:32 +0000
commit0c3cdd5ef2485a79d6fec9261f2850c41577d5b3 (patch)
treed69164c9f815e2d0308ba3f0d15b18e67163d879 /doc
parent37f7af4b9f1250e3c3439df03d43cf291a4d6f37 (diff)
downloadluasocket-0c3cdd5ef2485a79d6fec9261f2850c41577d5b3.tar.gz
luasocket-0c3cdd5ef2485a79d6fec9261f2850c41577d5b3.tar.bz2
luasocket-0c3cdd5ef2485a79d6fec9261f2850c41577d5b3.zip
Final push for release...
Diffstat (limited to 'doc')
-rw-r--r--doc/ftp.html10
-rw-r--r--doc/http.html7
-rw-r--r--doc/index.html4
-rw-r--r--doc/installation.html14
-rw-r--r--doc/reference.html4
-rw-r--r--doc/smtp.html8
-rw-r--r--doc/socket.html6
-rw-r--r--doc/tcp.html21
8 files changed, 45 insertions, 29 deletions
diff --git a/doc/ftp.html b/doc/ftp.html
index 7860c27..8b7ed96 100644
--- a/doc/ftp.html
+++ b/doc/ftp.html
@@ -106,6 +106,7 @@ ftp.<b>get{</b><br>
106&nbsp;&nbsp;[port = <i>number</i>,]<br> 106&nbsp;&nbsp;[port = <i>number</i>,]<br>
107&nbsp;&nbsp;[type = <i>string</i>,]<br> 107&nbsp;&nbsp;[type = <i>string</i>,]<br>
108&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br> 108&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br>
109&nbsp;&nbsp;[create = <i>function</i>]<br>
109<b>}</b> 110<b>}</b>
110</p> 111</p>
111 112
@@ -138,7 +139,9 @@ authentication. Defaults to "<tt>ftp:anonymous@anonymous.org</tt>";
138<li><tt>step</tt>: 139<li><tt>step</tt>:
139<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> 140<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
140pump step function used to pass data from the 141pump step function used to pass data from the
141server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function. 142server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;
143<li><tt>accept</tt>: An optional function to be used instead of
144<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
142</ul> 145</ul>
143 146
144<p class=return> 147<p class=return>
@@ -188,6 +191,7 @@ ftp.<b>put{</b><br>
188&nbsp;&nbsp;[port = <i>number</i>,]<br> 191&nbsp;&nbsp;[port = <i>number</i>,]<br>
189&nbsp;&nbsp;[type = <i>string</i>,]<br> 192&nbsp;&nbsp;[type = <i>string</i>,]<br>
190&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br> 193&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br>
194&nbsp;&nbsp;[create = <i>function</i>]<br>
191<b>}</b> 195<b>}</b>
192</p> 196</p>
193 197
@@ -220,7 +224,9 @@ authentication. Defaults to "<tt>ftp:anonymous@anonymous.org</tt>";
220<li><tt>step</tt>: 224<li><tt>step</tt>:
221<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> 225<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
222pump step function used to pass data from the 226pump step function used to pass data from the
223server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function. 227server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;
228<li><tt>accept</tt>: An optional function to be used instead of
229<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
224</ul> 230</ul>
225 231
226<p class=return> 232<p class=return>
diff --git a/doc/http.html b/doc/http.html
index af58571..27942b1 100644
--- a/doc/http.html
+++ b/doc/http.html
@@ -131,7 +131,8 @@ http.<b>request{</b><br>
131&nbsp;&nbsp;[source = <i>LTN12 source</i>],<br> 131&nbsp;&nbsp;[source = <i>LTN12 source</i>],<br>
132&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br> 132&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br>
133&nbsp;&nbsp;[proxy = <i>string</i>,]<br> 133&nbsp;&nbsp;[proxy = <i>string</i>,]<br>
134&nbsp;&nbsp;[redirect = <i>boolean</i>]<br> 134&nbsp;&nbsp;[redirect = <i>boolean</i>,]<br>
135&nbsp;&nbsp;[create = <i>function</i>]<br>
135<b>}</b> 136<b>}</b>
136</p> 137</p>
137 138
@@ -178,7 +179,9 @@ pump step function used to move data.
178Defaults to the LTN12 <tt>pump.step</tt> function. 179Defaults to the LTN12 <tt>pump.step</tt> function.
179<li><tt>proxy</tt>: The URL of a proxy server to use. Defaults to no proxy; 180<li><tt>proxy</tt>: The URL of a proxy server to use. Defaults to no proxy;
180<li><tt>redirect</tt>: Set to <tt><b>false</b></tt> to prevent the 181<li><tt>redirect</tt>: Set to <tt><b>false</b></tt> to prevent the
181function from automatically following 301 or 302 server redirect messages. 182function from automatically following 301 or 302 server redirect messages;
183<li><tt>accept</tt>: An optional function to be used instead of
184<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
182</ul> 185</ul>
183 186
184<p class=return> 187<p class=return>
diff --git a/doc/index.html b/doc/index.html
index 933fa5f..e596f8e 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -168,6 +168,7 @@ support.
168<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; 168<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;
169<li> Improved: HTTP, SMTP, and FTP functions to accept a new field 169<li> Improved: HTTP, SMTP, and FTP functions to accept a new field
170<tt>create</tt> that overrides the function used to create socket objects; 170<tt>create</tt> that overrides the function used to create socket objects;
171<li> Fixed: <tt>smtp.send</tt> was hanging on errors returned by LTN12 sources;
171<li> Fixed: <tt>url.absolute()</tt> to work when <tt>base_url</tt> is in 172<li> Fixed: <tt>url.absolute()</tt> to work when <tt>base_url</tt> is in
172parsed form; 173parsed form;
173<li> Fixed: <tt>http.request()</tt> not to redirect when the location 174<li> Fixed: <tt>http.request()</tt> not to redirect when the location
@@ -194,7 +195,8 @@ with descriptor 0 to be ignored (Renato Maia);
194<li> Fixed: "Bug" that caused <tt>gethostbyname</tt> to crash under VMS 195<li> Fixed: "Bug" that caused <tt>gethostbyname</tt> to crash under VMS
195(Renato Maia); 196(Renato Maia);
196<li> Fixed: <tt>tcp:send("")</tt> to return 0 bytes sent (Alexander Marinov); 197<li> Fixed: <tt>tcp:send("")</tt> to return 0 bytes sent (Alexander Marinov);
197<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. 198<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;
199<li> Improved: <tt>socket.select</tt> now works on empty sets on Windows.
198</ul> 200</ul>
199 201
200<!-- incompatible +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 202<!-- incompatible +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
diff --git a/doc/installation.html b/doc/installation.html
index 59815fa..62604ed 100644
--- a/doc/installation.html
+++ b/doc/installation.html
@@ -71,11 +71,11 @@ Here is the standard LuaSocket distribution directory structure:</p>
71 71
72<pre class=example> 72<pre class=example>
73&lt;ROOT&gt;/compat-5.1.lua 73&lt;ROOT&gt;/compat-5.1.lua
74&lt;ROOT&gt;/socket.lua
75&lt;ROOT&gt;/lsocket.dll
76&lt;ROOT&gt;/mime.lua
77&lt;ROOT&gt;/lmime.dll
78&lt;ROOT&gt;/ltn12.lua 74&lt;ROOT&gt;/ltn12.lua
75&lt;ROOT&gt;/mime/init.lua
76&lt;ROOT&gt;/mime/core.dll
77&lt;ROOT&gt;/socket/init.lua
78&lt;ROOT&gt;/socket/core.dll
79&lt;ROOT&gt;/socket/http.lua 79&lt;ROOT&gt;/socket/http.lua
80&lt;ROOT&gt;/socket/tp.lua 80&lt;ROOT&gt;/socket/tp.lua
81&lt;ROOT&gt;/socket/ftp.lua 81&lt;ROOT&gt;/socket/ftp.lua
@@ -83,10 +83,8 @@ Here is the standard LuaSocket distribution directory structure:</p>
83&lt;ROOT&gt;/socket/url.lua 83&lt;ROOT&gt;/socket/url.lua
84</pre> 84</pre>
85 85
86<p> Naturally, on Unix systems, <tt>lsocket.dll</tt> and <tt>lmime.dll</tt> 86<p> Naturally, on Unix systems, <tt>core.dll</tt>
87would be replaced by <tt>lsocket.so</tt> and <tt>lmime.so</tt>. In Mac OS 87would be replaced by <tt>core.so</tt>.
88X, they would be replaced by <tt>lsocket.dylib</tt> and
89<tt>lmime.dylib</tt>. </p>
90 88
91<p> In order for the interpreter to find all LuaSocket components, three 89<p> In order for the interpreter to find all LuaSocket components, three
92environment variables need to be set. The first environment variable tells 90environment variables need to be set. The first environment variable tells
diff --git a/doc/reference.html b/doc/reference.html
index fd5140b..b4b2f1d 100644
--- a/doc/reference.html
+++ b/doc/reference.html
@@ -142,7 +142,7 @@ Support, Manual">
142<blockquote> 142<blockquote>
143<a href="socket.html">Socket</a> 143<a href="socket.html">Socket</a>
144<blockquote> 144<blockquote>
145<a href="socket.html#_debug">_DEBUG</a>, 145<a href="socket.html#debug">_DEBUG</a>,
146<a href="dns.html#dns">dns</a>, 146<a href="dns.html#dns">dns</a>,
147<a href="socket.html#gettime">gettime</a>, 147<a href="socket.html#gettime">gettime</a>,
148<a href="socket.html#newtry">newtry</a>, 148<a href="socket.html#newtry">newtry</a>,
@@ -155,7 +155,7 @@ Support, Manual">
155<a href="tcp.html#tcp">tcp</a>, 155<a href="tcp.html#tcp">tcp</a>,
156<a href="socket.html#try">try</a>, 156<a href="socket.html#try">try</a>,
157<a href="udp.html#udp">udp</a>, 157<a href="udp.html#udp">udp</a>,
158<a href="socket.html#_version">_VERSION</a>. 158<a href="socket.html#version">_VERSION</a>.
159</blockquote> 159</blockquote>
160</blockquote> 160</blockquote>
161 161
diff --git a/doc/smtp.html b/doc/smtp.html
index bd18bfa..1e1523b 100644
--- a/doc/smtp.html
+++ b/doc/smtp.html
@@ -127,6 +127,7 @@ smtp.<b>send{</b><br>
127&nbsp;&nbsp;[port = <i>number</i>,]<br> 127&nbsp;&nbsp;[port = <i>number</i>,]<br>
128&nbsp;&nbsp;[domain = <i>string</i>,]<br> 128&nbsp;&nbsp;[domain = <i>string</i>,]<br>
129&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br> 129&nbsp;&nbsp;[step = <i>LTN12 pump step</i>,]<br>
130&nbsp;&nbsp;[create = <i>function</i>]<br>
130<b>}</b> 131<b>}</b>
131</p> 132</p>
132 133
@@ -138,6 +139,7 @@ doesn't have a simple interface. However, see the
138a very powerful way to define the message contents. 139a very powerful way to define the message contents.
139</p> 140</p>
140 141
142
141<p class=parameters> 143<p class=parameters>
142The sender is given by the e-mail address in the <tt>from</tt> field. 144The sender is given by the e-mail address in the <tt>from</tt> field.
143<tt>Rcpt</tt> is a Lua table with one entry for each recipient e-mail 145<tt>Rcpt</tt> is a Lua table with one entry for each recipient e-mail
@@ -158,7 +160,9 @@ local machine host name;
158<li> <tt>step</tt>: 160<li> <tt>step</tt>:
159<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> 161<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
160pump step function used to pass data from the 162pump step function used to pass data from the
161source to the server. Defaults to the LTN12 <tt>pump.step</tt> function. 163source to the server. Defaults to the LTN12 <tt>pump.step</tt> function;
164<li><tt>accept</tt>: An optional function to be used instead of
165<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
162</ul> 166</ul>
163 167
164<p class=return> 168<p class=return>
@@ -167,7 +171,7 @@ If successful, the function returns 1. Otherwise, the function returns
167</p> 171</p>
168 172
169<p class=note> 173<p class=note>
170Note: SMTP servers are can be very picky with the format of e-mail 174Note: SMTP servers can be very picky with the format of e-mail
171addresses. To be safe, use only addresses of the form 175addresses. To be safe, use only addresses of the form
172"<tt>&lt;fulano@example.com&gt;</tt>" in the <tt>from</tt> and 176"<tt>&lt;fulano@example.com&gt;</tt>" in the <tt>from</tt> and
173<tt>rcpt</tt> arguments to the <tt>send</tt> function. In headers, e-mail 177<tt>rcpt</tt> arguments to the <tt>send</tt> function. In headers, e-mail
diff --git a/doc/socket.html b/doc/socket.html
index 5cc7157..54b12cb 100644
--- a/doc/socket.html
+++ b/doc/socket.html
@@ -80,12 +80,12 @@ socket.<b>connect(</b>address, port [, locaddr, locport]<b>)</b>
80This function is a shortcut that creates and returns a TCP client object 80This function is a shortcut that creates and returns a TCP client object
81connected to a remote <tt>host</tt> at a given <tt>port</tt>. Optionally, 81connected to a remote <tt>host</tt> at a given <tt>port</tt>. Optionally,
82the user can also specify the local address and port to bind 82the user can also specify the local address and port to bind
83(<tt>locaddr</tt> and </tt>locport</tt>). 83(<tt>locaddr</tt> and <tt>locport</tt>).
84</p> 84</p>
85 85
86<!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 86<!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
87 87
88<p class=name id=_debug> 88<p class=name id=debug>
89socket.<b>_DEBUG</b> 89socket.<b>_DEBUG</b>
90</p> 90</p>
91 91
@@ -372,7 +372,7 @@ c = socket.try(socket.connect("localhost", 80))
372 372
373<!-- version ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 373<!-- version ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
374 374
375<p class=name id=_version> 375<p class=name id=version>
376socket.<b>_VERSION</b> 376socket.<b>_VERSION</b>
377</p> 377</p>
378 378
diff --git a/doc/tcp.html b/doc/tcp.html
index ae8efd5..5c810de 100644
--- a/doc/tcp.html
+++ b/doc/tcp.html
@@ -79,7 +79,7 @@ reported by <b><tt>nil</tt></b> followed by a message describing the error.
79<p class=note> 79<p class=note>
80Note: calling <a href=socket.html#select><tt>socket.select</tt></a> 80Note: calling <a href=socket.html#select><tt>socket.select</tt></a>
81with a server object in 81with a server object in
82the <tt>receive</tt> parameter before a call to <tt>accept</tt> does 82the <tt>recvt</tt> parameter before a call to <tt>accept</tt> does
83<em>not</em> guarantee <tt>accept</tt> will return immediately. Use the <a 83<em>not</em> guarantee <tt>accept</tt> will return immediately. Use the <a
84href=#settimeout><tt>settimeout</tt></a> method or <tt>accept</tt> 84href=#settimeout><tt>settimeout</tt></a> method or <tt>accept</tt>
85might block until <em>another</em> client shows up. 85might block until <em>another</em> client shows up.
@@ -111,7 +111,7 @@ method returns <b><tt>nil</tt></b> followed by an error message.
111 111
112<p class=note> 112<p class=note>
113Note: The function <a href=socket.html#bind><tt>socket.bind</tt></a> 113Note: The function <a href=socket.html#bind><tt>socket.bind</tt></a>
114is available and is a shortcut for the creation server sockets. 114is available and is a shortcut for the creation of server sockets.
115</p> 115</p>
116 116
117<!-- close ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 117<!-- close ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -173,8 +173,11 @@ is available and is a shortcut for the creation of client sockets.
173<p class=note> 173<p class=note>
174Note: Starting with LuaSocket 2.0, 174Note: Starting with LuaSocket 2.0,
175the <a href=#settimeout><tt>settimeout</tt></a> 175the <a href=#settimeout><tt>settimeout</tt></a>
176method affects the behavior of connect, causing it to return in case of 176method affects the behavior of <tt>connect</tt>, causing it to return
177a timeout. 177with an error in case of a timeout. If that happens, you can still call <a
178href=socket.html#select><tt>socket.select</tt></a> with the socket in the
179<tt>sendt</tt> table. The socket will be writable when the connection is
180stablished.
178</p> 181</p>
179 182
180<!-- getpeername ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 183<!-- getpeername ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -328,11 +331,11 @@ substring to be sent.
328</p> 331</p>
329 332
330<p class=return> 333<p class=return>
331If successful, the method returns the number of bytes accepted by 334If successful, the method returns the number of bytes sent.
332the transport layer. In case of error, the method returns 335In case of error, the method returns
333<b><tt>nil</tt></b>, followed by an error message, followed by the 336<b><tt>nil</tt></b>, followed by an error message, followed by the
334partial number of bytes accepted by the transport layer. 337index of the first character within <tt>[i, j]</tt> that has not been sent yet
335The error message can be '<tt>closed</tt>' in case 338(you might want to try again from then on). The error message can be '<tt>closed</tt>' in case
336the connection was closed before the transmission was completed or the 339the connection was closed before the transmission was completed or the
337string '<tt>timeout</tt>' in case there was a timeout during the 340string '<tt>timeout</tt>' in case there was a timeout during the
338operation. 341operation.
@@ -433,7 +436,7 @@ of bandwidth.
433<p class=parameters> 436<p class=parameters>
434<tt>Received</tt> is a number with the new number of bytes received. 437<tt>Received</tt> is a number with the new number of bytes received.
435<tt>Sent</tt> is a number with the new number of bytes sent. 438<tt>Sent</tt> is a number with the new number of bytes sent.
436<tt>Age</tt> is the new age in seconds</tt> 439<tt>Age</tt> is the new age in seconds.
437</p> 440</p>
438 441
439<p class=return> 442<p class=return>