aboutsummaryrefslogtreecommitdiff
path: root/doc/tcp.html
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-15 06:24:00 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-15 06:24:00 +0000
commit58096449c6044b7aade5cd41cfd71c6bec1d273d (patch)
tree1814ffebe89c4c2556d84f97f66db37a7e8b4554 /doc/tcp.html
parent9ed7f955e5fc69af9bf1794fa2c8cd227981ba24 (diff)
downloadluasocket-58096449c6044b7aade5cd41cfd71c6bec1d273d.tar.gz
luasocket-58096449c6044b7aade5cd41cfd71c6bec1d273d.tar.bz2
luasocket-58096449c6044b7aade5cd41cfd71c6bec1d273d.zip
Manual is almost done. HTTP is missing.
Implemented new distribution scheme. Select is now purely C. HTTP reimplemented seems faster dunno why. LTN12 functions that coroutines fail gracefully.
Diffstat (limited to 'doc/tcp.html')
-rw-r--r--doc/tcp.html29
1 files changed, 16 insertions, 13 deletions
diff --git a/doc/tcp.html b/doc/tcp.html
index 34d6c6e..7a49660 100644
--- a/doc/tcp.html
+++ b/doc/tcp.html
@@ -241,18 +241,16 @@ method returns <b><tt>nil</tt></b> followed by an error message.
241<!-- receive ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 241<!-- receive ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
242 242
243<p class=name id=receive> 243<p class=name id=receive>
244client:<b>receive(</b>[pattern<sub>1</sub>, pattern<sub>2</sub>, 244client:<b>receive(</b>[pattern]<b>)</b>
245... pattern<sub>N</sub>]<b>)</b>
246</p> 245</p>
247 246
248<p class=description> 247<p class=description>
249Reads data from a client object, according to the specified <em>read 248Reads data from a client object, according to the specified <em>read
250patterns</em>. Patterns follow the Lua file I/O format, and the difference in performance between all patterns is negligible. 249pattern</em>. Patterns follow the Lua file I/O format, and the difference in performance between all patterns is negligible.
251</p> 250</p>
252 251
253<p class=parameters> 252<p class=parameters>
254The parameters <tt>pattern</tt><sub>1</sub>, <tt>pattern</tt><sub>2</sub>, ... 253<tt>Pattern</tt> can be any of the following:
255<tt>pattern</tt><sub>N</sub> can be any of the following:
256</p> 254</p>
257 255
258<ul> 256<ul>
@@ -267,16 +265,21 @@ of bytes from the socket.
267</ul> 265</ul>
268 266
269<p class=return> 267<p class=return>
270The method returns one value for each pattern, followed by a single 268If successful, the method returns the received pattern. In case of error,
271error code that can be <b><tt>nil</tt></b> in case of success, the string 269the method returns <tt><b>nil</b></tt> followed by an error message which
272'<tt>closed</tt>' in case the connection was closed before the 270can be the string '<tt>closed</tt>' in case the connection was
273transmission was completed or the string '<tt>timeout</tt>' in case 271closed before the transmission was completed or the string
274there was a timeout during the operation. 272'<tt>timeout</tt>' in case there was a timeout during the operation.
273Also, after the error message, the function returns the partial result of
274the transmission.
275</p> 275</p>
276 276
277<p class=note> 277<p class=note>
278Note: In case of error, the method always return everything it managed 278<b>Important note</b>: This function was changed <em>severely</em>. It used
279to download before the error condition was met. 279to support multiple patterns (but I have never seen this feature used) and
280partial results used to be returned in the same way as successful results.
281This last feature violated the idea that all functions should return
282<tt><b>nil</b></tt> on error. Thus the change.
280</p> 283</p>
281 284
282<!-- send +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 285<!-- send +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -428,7 +431,7 @@ client:<b>shutdown(</b>mode<b>)</b><br>
428</p> 431</p>
429 432
430<p class=description> 433<p class=description>
431Shuts down part of a full duplex connection. 434Shuts down part of a full-duplex connection.
432</p> 435</p>
433 436
434<p class=parameters> 437<p class=parameters>