diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-08-12 05:56:32 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-08-12 05:56:32 +0000 |
commit | 0c3cdd5ef2485a79d6fec9261f2850c41577d5b3 (patch) | |
tree | d69164c9f815e2d0308ba3f0d15b18e67163d879 /doc | |
parent | 37f7af4b9f1250e3c3439df03d43cf291a4d6f37 (diff) | |
download | luasocket-0c3cdd5ef2485a79d6fec9261f2850c41577d5b3.tar.gz luasocket-0c3cdd5ef2485a79d6fec9261f2850c41577d5b3.tar.bz2 luasocket-0c3cdd5ef2485a79d6fec9261f2850c41577d5b3.zip |
Final push for release...
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ftp.html | 10 | ||||
-rw-r--r-- | doc/http.html | 7 | ||||
-rw-r--r-- | doc/index.html | 4 | ||||
-rw-r--r-- | doc/installation.html | 14 | ||||
-rw-r--r-- | doc/reference.html | 4 | ||||
-rw-r--r-- | doc/smtp.html | 8 | ||||
-rw-r--r-- | doc/socket.html | 6 | ||||
-rw-r--r-- | doc/tcp.html | 21 |
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 | [port = <i>number</i>,]<br> | 106 | [port = <i>number</i>,]<br> |
107 | [type = <i>string</i>,]<br> | 107 | [type = <i>string</i>,]<br> |
108 | [step = <i>LTN12 pump step</i>,]<br> | 108 | [step = <i>LTN12 pump step</i>,]<br> |
109 | [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> |
140 | pump step function used to pass data from the | 141 | pump step function used to pass data from the |
141 | server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function. | 142 | server 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 | [port = <i>number</i>,]<br> | 191 | [port = <i>number</i>,]<br> |
189 | [type = <i>string</i>,]<br> | 192 | [type = <i>string</i>,]<br> |
190 | [step = <i>LTN12 pump step</i>,]<br> | 193 | [step = <i>LTN12 pump step</i>,]<br> |
194 | [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> |
222 | pump step function used to pass data from the | 226 | pump step function used to pass data from the |
223 | server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function. | 227 | server 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 | [source = <i>LTN12 source</i>],<br> | 131 | [source = <i>LTN12 source</i>],<br> |
132 | [step = <i>LTN12 pump step</i>,]<br> | 132 | [step = <i>LTN12 pump step</i>,]<br> |
133 | [proxy = <i>string</i>,]<br> | 133 | [proxy = <i>string</i>,]<br> |
134 | [redirect = <i>boolean</i>]<br> | 134 | [redirect = <i>boolean</i>,]<br> |
135 | [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. | |||
178 | Defaults to the LTN12 <tt>pump.step</tt> function. | 179 | Defaults 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 |
181 | function from automatically following 301 or 302 server redirect messages. | 182 | function 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 |
172 | parsed form; | 173 | parsed 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 | <ROOT>/compat-5.1.lua | 73 | <ROOT>/compat-5.1.lua |
74 | <ROOT>/socket.lua | ||
75 | <ROOT>/lsocket.dll | ||
76 | <ROOT>/mime.lua | ||
77 | <ROOT>/lmime.dll | ||
78 | <ROOT>/ltn12.lua | 74 | <ROOT>/ltn12.lua |
75 | <ROOT>/mime/init.lua | ||
76 | <ROOT>/mime/core.dll | ||
77 | <ROOT>/socket/init.lua | ||
78 | <ROOT>/socket/core.dll | ||
79 | <ROOT>/socket/http.lua | 79 | <ROOT>/socket/http.lua |
80 | <ROOT>/socket/tp.lua | 80 | <ROOT>/socket/tp.lua |
81 | <ROOT>/socket/ftp.lua | 81 | <ROOT>/socket/ftp.lua |
@@ -83,10 +83,8 @@ Here is the standard LuaSocket distribution directory structure:</p> | |||
83 | <ROOT>/socket/url.lua | 83 | <ROOT>/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> |
87 | would be replaced by <tt>lsocket.so</tt> and <tt>lmime.so</tt>. In Mac OS | 87 | would be replaced by <tt>core.so</tt>. |
88 | X, 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 |
92 | environment variables need to be set. The first environment variable tells | 90 | environment 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 | [port = <i>number</i>,]<br> | 127 | [port = <i>number</i>,]<br> |
128 | [domain = <i>string</i>,]<br> | 128 | [domain = <i>string</i>,]<br> |
129 | [step = <i>LTN12 pump step</i>,]<br> | 129 | [step = <i>LTN12 pump step</i>,]<br> |
130 | [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 | |||
138 | a very powerful way to define the message contents. | 139 | a very powerful way to define the message contents. |
139 | </p> | 140 | </p> |
140 | 141 | ||
142 | |||
141 | <p class=parameters> | 143 | <p class=parameters> |
142 | The sender is given by the e-mail address in the <tt>from</tt> field. | 144 | The 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> |
160 | pump step function used to pass data from the | 162 | pump step function used to pass data from the |
161 | source to the server. Defaults to the LTN12 <tt>pump.step</tt> function. | 163 | source 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> |
170 | Note: SMTP servers are can be very picky with the format of e-mail | 174 | Note: SMTP servers can be very picky with the format of e-mail |
171 | addresses. To be safe, use only addresses of the form | 175 | addresses. To be safe, use only addresses of the form |
172 | "<tt><fulano@example.com></tt>" in the <tt>from</tt> and | 176 | "<tt><fulano@example.com></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> | |||
80 | This function is a shortcut that creates and returns a TCP client object | 80 | This function is a shortcut that creates and returns a TCP client object |
81 | connected to a remote <tt>host</tt> at a given <tt>port</tt>. Optionally, | 81 | connected to a remote <tt>host</tt> at a given <tt>port</tt>. Optionally, |
82 | the user can also specify the local address and port to bind | 82 | the 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> |
89 | socket.<b>_DEBUG</b> | 89 | socket.<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> |
376 | socket.<b>_VERSION</b> | 376 | socket.<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> |
80 | Note: calling <a href=socket.html#select><tt>socket.select</tt></a> | 80 | Note: calling <a href=socket.html#select><tt>socket.select</tt></a> |
81 | with a server object in | 81 | with a server object in |
82 | the <tt>receive</tt> parameter before a call to <tt>accept</tt> does | 82 | the <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 |
84 | href=#settimeout><tt>settimeout</tt></a> method or <tt>accept</tt> | 84 | href=#settimeout><tt>settimeout</tt></a> method or <tt>accept</tt> |
85 | might block until <em>another</em> client shows up. | 85 | 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. | |||
111 | 111 | ||
112 | <p class=note> | 112 | <p class=note> |
113 | Note: The function <a href=socket.html#bind><tt>socket.bind</tt></a> | 113 | Note: The function <a href=socket.html#bind><tt>socket.bind</tt></a> |
114 | is available and is a shortcut for the creation server sockets. | 114 | is 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> |
174 | Note: Starting with LuaSocket 2.0, | 174 | Note: Starting with LuaSocket 2.0, |
175 | the <a href=#settimeout><tt>settimeout</tt></a> | 175 | the <a href=#settimeout><tt>settimeout</tt></a> |
176 | method affects the behavior of connect, causing it to return in case of | 176 | method affects the behavior of <tt>connect</tt>, causing it to return |
177 | a timeout. | 177 | with an error in case of a timeout. If that happens, you can still call <a |
178 | href=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 | ||
180 | stablished. | ||
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> |
331 | If successful, the method returns the number of bytes accepted by | 334 | If successful, the method returns the number of bytes sent. |
332 | the transport layer. In case of error, the method returns | 335 | In 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 |
334 | partial number of bytes accepted by the transport layer. | 337 | index of the first character within <tt>[i, j]</tt> that has not been sent yet |
335 | The 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 |
336 | the connection was closed before the transmission was completed or the | 339 | the connection was closed before the transmission was completed or the |
337 | string '<tt>timeout</tt>' in case there was a timeout during the | 340 | string '<tt>timeout</tt>' in case there was a timeout during the |
338 | operation. | 341 | operation. |
@@ -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> |