diff options
| author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2026-09-01 10:00:21 +0200 |
|---|---|---|
| committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2026-09-01 10:48:40 +0200 |
| commit | 70f7800986812ad0d1a5dd6f280f66fd2bf1dd12 (patch) | |
| tree | 36051874b3ce036307d4bb69b3c4058458b6255d /docs/udp.html | |
| parent | fa9b35a0cf11bc856cbd8bffbef5ad6fb3e62a93 (diff) | |
| download | luasocket-docs/pre-release-audit.tar.gz luasocket-docs/pre-release-audit.tar.bz2 luasocket-docs/pre-release-audit.zip | |
docs: document socket.unix and socket.serial, fix stale/missing API referencesdocs/pre-release-audit
Pre-release documentation audit against master. Adds the two fully
undocumented modules and closes gaps found by diffing every docs/*.html
page against its corresponding source:
- New docs/unix.html and docs/serial.html (socket.unix stream/dgram and
socket.serial were never documented), linked from index.html,
introduction.html, socket.html and reference.html. serial.html notes
the current lack of a baud/parity/flow-control API and includes an
os.execute+stty workaround example. Both note Windows is unsupported.
- socket.html: document headers.setcanonic, point to unix/serial modules.
- tcp.html: document getfamily, setpeername/setsockname aliases.
- udp.html: document getfamily, getfd/setfd, dirty; document the
ipv6-multicast-hops/ipv6-unicast-hops aliasing as current (known-buggy)
behavior rather than the originally intended semantics.
- http.html: correct redirect text (301/302/303/307/308, was 301/302
only); document MAXHEADERLINE/MAXHEADERSIZE.
- dns.html: document getnameinfo.
- ltn12.html: document source.rewind and BLOCKSIZE.
- installation.html: fix stale "LuaSocket 3.0" sample output to 3.1.0.
- reference.html: index every anchor added above plus new Unix/Serial
blocks.
Diffstat (limited to '')
| -rw-r--r-- | docs/udp.html | 88 |
1 files changed, 86 insertions, 2 deletions
diff --git a/docs/udp.html b/docs/udp.html index 8d807a4..d2c169a 100644 --- a/docs/udp.html +++ b/docs/udp.html | |||
| @@ -62,6 +62,66 @@ Garbage-collected objects are automatically closed before | |||
| 62 | destruction, though. | 62 | destruction, though. |
| 63 | </p> | 63 | </p> |
| 64 | 64 | ||
| 65 | <!-- dirty +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
| 66 | |||
| 67 | <p class="name" id="dirty"> | ||
| 68 | connected:<b>dirty()</b><br> | ||
| 69 | unconnected:<b>dirty()</b> | ||
| 70 | </p> | ||
| 71 | |||
| 72 | <p class="description"> | ||
| 73 | Check the read buffer status. | ||
| 74 | </p> | ||
| 75 | |||
| 76 | <p class="return"> | ||
| 77 | Returns <tt>false</tt>. UDP objects do not keep a read buffer, so this | ||
| 78 | always reports no buffered data. | ||
| 79 | </p> | ||
| 80 | |||
| 81 | <p class="note"> | ||
| 82 | Note: <b>This is an internal method, use at your own risk.</b> | ||
| 83 | </p> | ||
| 84 | |||
| 85 | <!-- getfamily +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
| 86 | |||
| 87 | <p class="name" id="getfamily"> | ||
| 88 | connected:<b>getfamily()</b><br> | ||
| 89 | unconnected:<b>getfamily()</b> | ||
| 90 | </p> | ||
| 91 | |||
| 92 | <p class="description"> | ||
| 93 | Returns the family of the underlying socket, as chosen when the object was | ||
| 94 | created by <a href="#socket.udp"><tt>socket.udp</tt></a>, | ||
| 95 | <a href="#socket.udp4"><tt>socket.udp4</tt></a> or | ||
| 96 | <a href="#socket.udp6"><tt>socket.udp6</tt></a>. | ||
| 97 | </p> | ||
| 98 | |||
| 99 | <p class="return"> | ||
| 100 | The string "<tt>inet4</tt>" or "<tt>inet6</tt>". | ||
| 101 | </p> | ||
| 102 | |||
| 103 | <!-- getfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
| 104 | |||
| 105 | <p class="name" id="getfd"> | ||
| 106 | connected:<b>getfd()</b><br> | ||
| 107 | unconnected:<b>getfd()</b> | ||
| 108 | </p> | ||
| 109 | |||
| 110 | <p class="description"> | ||
| 111 | Returns the underling socket descriptor or handle associated to the object. | ||
| 112 | </p> | ||
| 113 | |||
| 114 | <p class="return"> | ||
| 115 | The descriptor or handle. In case the object has been closed, the return value | ||
| 116 | will be -1. For an invalid socket it will be <a href="socket.html#socketinvalid"> | ||
| 117 | <tt>_SOCKETINVALID</tt></a>. | ||
| 118 | </p> | ||
| 119 | |||
| 120 | <p class="note"> | ||
| 121 | Note: <b>This is an internal method. Unlikely to be | ||
| 122 | portable. Use at your own risk. </b> | ||
| 123 | </p> | ||
| 124 | |||
| 65 | <!-- getoption +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 125 | <!-- getoption +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| 66 | 126 | ||
| 67 | <p class="name" id="getoption"> | 127 | <p class="name" id="getoption"> |
| @@ -321,8 +381,10 @@ Sets the unicast hop limit (the IPv6 equivalent of the IPv4 TTL) | |||
| 321 | for outgoing packets. | 381 | for outgoing packets. |
| 322 | Receives a number;</li> | 382 | Receives a number;</li> |
| 323 | <li> '<tt>ipv6-multicast-hops</tt>': | 383 | <li> '<tt>ipv6-multicast-hops</tt>': |
| 324 | Sets the hop limit for outgoing IPv6 multicast datagrams. | 384 | <b>Known limitation:</b> this option is currently wired to the same |
| 325 | Receives a number;</li> | 385 | underlying setting as <tt>ipv6-unicast-hops</tt> instead of a separate |
| 386 | multicast hop limit, so getting or setting one also gets or sets the | ||
| 387 | other. Receives a number;</li> | ||
| 326 | <li> '<tt>ipv6-multicast-loop</tt>': | 388 | <li> '<tt>ipv6-multicast-loop</tt>': |
| 327 | Specifies whether or not a copy of an outgoing IPv6 multicast | 389 | Specifies whether or not a copy of an outgoing IPv6 multicast |
| 328 | datagram is delivered to the sending host as long as it is a | 390 | datagram is delivered to the sending host as long as it is a |
| @@ -374,6 +436,28 @@ Note: The descriptions above come from the man pages. | |||
| 374 | </p> | 436 | </p> |
| 375 | 437 | ||
| 376 | 438 | ||
| 439 | <!-- setfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
| 440 | |||
| 441 | <p class="name" id="setfd"> | ||
| 442 | connected:<b>setfd(</b>fd<b>)</b><br> | ||
| 443 | unconnected:<b>setfd(</b>fd<b>)</b> | ||
| 444 | </p> | ||
| 445 | |||
| 446 | <p class="description"> | ||
| 447 | Sets the underling socket descriptor or handle associated to the object. The current one | ||
| 448 | is simply replaced, not closed, and no other change to the object state is made. | ||
| 449 | To set it as invalid use <a href="socket.html#socketinvalid"><tt>_SOCKETINVALID</tt></a>. | ||
| 450 | </p> | ||
| 451 | |||
| 452 | <p class="return"> | ||
| 453 | No return value. | ||
| 454 | </p> | ||
| 455 | |||
| 456 | <p class="note"> | ||
| 457 | Note: <b>This is an internal method. Unlikely to be | ||
| 458 | portable. Use at your own risk. </b> | ||
| 459 | </p> | ||
| 460 | |||
| 377 | <!-- setpeername +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 461 | <!-- setpeername +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| 378 | 462 | ||
| 379 | <p class="name" id="setpeername"> | 463 | <p class="name" id="setpeername"> |
