aboutsummaryrefslogtreecommitdiff
path: root/doc/tcp.html
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-18 08:02:09 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-18 08:02:09 +0000
commitac4aac0909da26befaaeb6b415f66cf35b6980e0 (patch)
tree3d3289e6192508484dcbefa10e2d862c5cc06d64 /doc/tcp.html
parent62799a416d2b29d8058331f3d8725fb67c75d261 (diff)
downloadluasocket-ac4aac0909da26befaaeb6b415f66cf35b6980e0.tar.gz
luasocket-ac4aac0909da26befaaeb6b415f66cf35b6980e0.tar.bz2
luasocket-ac4aac0909da26befaaeb6b415f66cf35b6980e0.zip
Implemented safe exceptions. This looks preeety good.
Diffstat (limited to 'doc/tcp.html')
-rw-r--r--doc/tcp.html28
1 files changed, 17 insertions, 11 deletions
diff --git a/doc/tcp.html b/doc/tcp.html
index 781ec6f..cd417a5 100644
--- a/doc/tcp.html
+++ b/doc/tcp.html
@@ -277,9 +277,10 @@ the transmission.
277<p class=note> 277<p class=note>
278<b>Important note</b>: This function was changed <em>severely</em>. It used 278<b>Important note</b>: This function was changed <em>severely</em>. It used
279to support multiple patterns (but I have never seen this feature used) and 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. 280now it doesn't anymore. Partial results used to be returned in the same
281This last feature violated the idea that all functions should return 281way as successful results. This last feature violated the idea that all
282<tt><b>nil</b></tt> on error. Thus the change. 282functions should return <tt><b>nil</b></tt> on error. Thus it was changed
283too.
283</p> 284</p>
284 285
285<!-- send +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 286<!-- send +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@@ -300,20 +301,25 @@ result to LuaSocket instead of passing several independent strings.
300</p> 301</p>
301 302
302<p class=return> 303<p class=return>
303The method returns the number of bytes accepted by the transport layer, 304If successful, the method returns the number of bytes accepted by
304followed by an error code. The error code is <b><tt>nil</tt></b> if the operation 305the transport layer. In case of error, the method returns
305completed with no errors, the string '<tt>closed</tt>' in case 306<b><tt>nil</tt></b>, followed by an error message, followed by the
307partial number of bytes accepted by the transport layer.
308The error message can be '<tt>closed</tt>' in case
306the connection was closed before the transmission was completed or the 309the connection was closed before the transmission was completed or the
307string '<tt>timeout</tt>' in case there was a timeout during the 310string '<tt>timeout</tt>' in case there was a timeout during the
308operation. 311operation.
309</p> 312</p>
310 313
311<p class=note> 314<p class=note>
312Note: The return values for the <tt>send</tt> method have been changed in 315<b>Important note</b>:
313LuaSocket 2.0! In previous versions, the method returned only the 316The return values for the <tt>send</tt> method have been changed in
314error message. Since returning <b><tt>nil</tt></b> in case of success goes 317LuaSocket 2.0 alpha <b>and again</b> in the beta (sorry)!
315against all other LuaSocket methods and functions, the 318In previous versions, the method returned only the
316<tt>send</tt> method been changed for the sake of uniformity. 319error message. Since returning <b><tt>nil</tt></b> in case of success was
320nonsense, in alpha the first return value became the number of bytes sent.
321Alas, it wasn't returning <tt><b>nil</b></tt> in case of
322error. So it was changed again in beta.
317</p> 323</p>
318 324
319<!-- setoption ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 325<!-- setoption ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->