diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2011-10-24 11:24:58 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2012-04-11 13:45:59 -0700 |
commit | 12bde801f6a5d3a192dee29dda1266108aa98d45 (patch) | |
tree | 64c6166ae6d968f10d260ec5172de0ac1d4e576a | |
parent | 3a0fd4744daa972e59579a753af2da9dbde36edd (diff) | |
download | luasocket-12bde801f6a5d3a192dee29dda1266108aa98d45.tar.gz luasocket-12bde801f6a5d3a192dee29dda1266108aa98d45.tar.bz2 luasocket-12bde801f6a5d3a192dee29dda1266108aa98d45.zip |
Document dirty, getfd, and setfd for select and tcp.
-rw-r--r-- | doc/reference.html | 3 | ||||
-rw-r--r-- | doc/socket.html | 4 | ||||
-rw-r--r-- | doc/tcp.html | 60 |
3 files changed, 67 insertions, 0 deletions
diff --git a/doc/reference.html b/doc/reference.html index f13a6bd..edffc40 100644 --- a/doc/reference.html +++ b/doc/reference.html | |||
@@ -170,12 +170,15 @@ Support, Manual"> | |||
170 | <a href="tcp.html#bind">bind</a>, | 170 | <a href="tcp.html#bind">bind</a>, |
171 | <a href="tcp.html#close">close</a>, | 171 | <a href="tcp.html#close">close</a>, |
172 | <a href="tcp.html#connect">connect</a>, | 172 | <a href="tcp.html#connect">connect</a>, |
173 | <a href="tcp.html#dirty">dirty</a>, | ||
174 | <a href="tcp.html#getfd">getfd</a>, | ||
173 | <a href="tcp.html#getpeername">getpeername</a>, | 175 | <a href="tcp.html#getpeername">getpeername</a>, |
174 | <a href="tcp.html#getsockname">getsockname</a>, | 176 | <a href="tcp.html#getsockname">getsockname</a>, |
175 | <a href="tcp.html#getstats">getstats</a>, | 177 | <a href="tcp.html#getstats">getstats</a>, |
176 | <a href="tcp.html#listen">listen</a>, | 178 | <a href="tcp.html#listen">listen</a>, |
177 | <a href="tcp.html#receive">receive</a>, | 179 | <a href="tcp.html#receive">receive</a>, |
178 | <a href="tcp.html#send">send</a>, | 180 | <a href="tcp.html#send">send</a>, |
181 | <a href="tcp.html#setfd">setfd</a>, | ||
179 | <a href="tcp.html#setoption">setoption</a>, | 182 | <a href="tcp.html#setoption">setoption</a>, |
180 | <a href="tcp.html#setstats">setstats</a>, | 183 | <a href="tcp.html#setstats">setstats</a>, |
181 | <a href="tcp.html#settimeout">settimeout</a>, | 184 | <a href="tcp.html#settimeout">settimeout</a>, |
diff --git a/doc/socket.html b/doc/socket.html index f096e4b..4d44f01 100644 --- a/doc/socket.html +++ b/doc/socket.html | |||
@@ -217,6 +217,10 @@ method or <tt>accept</tt> might block forever. | |||
217 | it to <tt>select</tt>, it will be ignored. | 217 | it to <tt>select</tt>, it will be ignored. |
218 | </p> | 218 | </p> |
219 | 219 | ||
220 | <p class=note> | ||
221 | <b>Using select with non-socket objects</b>: Any object that implements <tt>getfd</tt> and <tt>dirty</tt> can be used with <tt>select</tt>, allowing objects from other libraries to be used within a <tt>socket.select</tt> driven loop. | ||
222 | </p> | ||
223 | |||
220 | <!-- sink ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 224 | <!-- sink ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
221 | 225 | ||
222 | <p class=name id=sink> | 226 | <p class=name id=sink> |
diff --git a/doc/tcp.html b/doc/tcp.html index 602c73c..ab70f04 100644 --- a/doc/tcp.html +++ b/doc/tcp.html | |||
@@ -507,6 +507,66 @@ This is the default mode; | |||
507 | This function returns 1. | 507 | This function returns 1. |
508 | </p> | 508 | </p> |
509 | 509 | ||
510 | <!-- dirty +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
511 | |||
512 | <p class=name id=dirty> | ||
513 | master:<b>dirty()</b><br> | ||
514 | client:<b>dirty()</b><br> | ||
515 | server:<b>dirty()</b> | ||
516 | </p> | ||
517 | |||
518 | <p class=description> | ||
519 | Check the read buffer status. | ||
520 | </p> | ||
521 | |||
522 | <p class=return> | ||
523 | Returns <tt>true</tt> if there is any data in the read buffer, <tt>false</tt> otherwise. | ||
524 | </p> | ||
525 | |||
526 | <p class=note> | ||
527 | Note: <b>This is an internal method, any use is unlikely to be portable.</b> | ||
528 | </p> | ||
529 | |||
530 | <!-- getfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
531 | |||
532 | <p class=name id=getfd> | ||
533 | master:<b>getfd()</b><br> | ||
534 | client:<b>getfd()</b><br> | ||
535 | server:<b>getfd()</b> | ||
536 | </p> | ||
537 | |||
538 | <p class=description> | ||
539 | Returns the underling socket descriptor or handle associated to the object. | ||
540 | </p> | ||
541 | |||
542 | <p class=return> | ||
543 | The descriptor or handle. In case the object has been closed, the return will be -1. | ||
544 | </p> | ||
545 | |||
546 | <p class=note> | ||
547 | Note: <b>This is an internal method, any use is unlikely to be portable.</b> | ||
548 | </p> | ||
549 | |||
550 | <!-- setfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
551 | |||
552 | <p class=name id=setfd> | ||
553 | master:<b>setfd(</b>fd<b>)</b><br> | ||
554 | client:<b>setfd(</b>fd<b>)</b><br> | ||
555 | server:<b>setfd(</b>fd<b>)</b> | ||
556 | </p> | ||
557 | |||
558 | <p class=description> | ||
559 | Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made. | ||
560 | </p> | ||
561 | |||
562 | <p class=return> | ||
563 | No return value. | ||
564 | </p> | ||
565 | |||
566 | <p class=note> | ||
567 | Note: <b>This is an internal method, any use is unlikely to be portable.</b> | ||
568 | </p> | ||
569 | |||
510 | <!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 570 | <!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
511 | 571 | ||
512 | <div class=footer> | 572 | <div class=footer> |