aboutsummaryrefslogtreecommitdiff
path: root/docs/udp.html
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2026-09-01 10:00:21 +0200
committerThijs Schreijer <thijs@thijsschreijer.nl>2026-09-01 10:48:40 +0200
commit70f7800986812ad0d1a5dd6f280f66fd2bf1dd12 (patch)
tree36051874b3ce036307d4bb69b3c4058458b6255d /docs/udp.html
parentfa9b35a0cf11bc856cbd8bffbef5ad6fb3e62a93 (diff)
downloadluasocket-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.html88
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
62destruction, though. 62destruction, though.
63</p> 63</p>
64 64
65<!-- dirty +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
66
67<p class="name" id="dirty">
68connected:<b>dirty()</b><br>
69unconnected:<b>dirty()</b>
70</p>
71
72<p class="description">
73Check the read buffer status.
74</p>
75
76<p class="return">
77Returns <tt>false</tt>. UDP objects do not keep a read buffer, so this
78always reports no buffered data.
79</p>
80
81<p class="note">
82Note: <b>This is an internal method, use at your own risk.</b>
83</p>
84
85<!-- getfamily +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
86
87<p class="name" id="getfamily">
88connected:<b>getfamily()</b><br>
89unconnected:<b>getfamily()</b>
90</p>
91
92<p class="description">
93Returns the family of the underlying socket, as chosen when the object was
94created 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">
100The string "<tt>inet4</tt>" or "<tt>inet6</tt>".
101</p>
102
103<!-- getfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
104
105<p class="name" id="getfd">
106connected:<b>getfd()</b><br>
107unconnected:<b>getfd()</b>
108</p>
109
110<p class="description">
111Returns the underling socket descriptor or handle associated to the object.
112</p>
113
114<p class="return">
115The descriptor or handle. In case the object has been closed, the return value
116will 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">
121Note: <b>This is an internal method. Unlikely to be
122portable. 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)
321for outgoing packets. 381for outgoing packets.
322Receives a number;</li> 382Receives a number;</li>
323<li> '<tt>ipv6-multicast-hops</tt>': 383<li> '<tt>ipv6-multicast-hops</tt>':
324Sets the hop limit for outgoing IPv6 multicast datagrams. 384<b>Known limitation:</b> this option is currently wired to the same
325Receives a number;</li> 385underlying setting as <tt>ipv6-unicast-hops</tt> instead of a separate
386multicast hop limit, so getting or setting one also gets or sets the
387other. Receives a number;</li>
326<li> '<tt>ipv6-multicast-loop</tt>': 388<li> '<tt>ipv6-multicast-loop</tt>':
327Specifies whether or not a copy of an outgoing IPv6 multicast 389Specifies whether or not a copy of an outgoing IPv6 multicast
328datagram is delivered to the sending host as long as it is a 390datagram 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">
442connected:<b>setfd(</b>fd<b>)</b><br>
443unconnected:<b>setfd(</b>fd<b>)</b>
444</p>
445
446<p class="description">
447Sets the underling socket descriptor or handle associated to the object. The current one
448is simply replaced, not closed, and no other change to the object state is made.
449To set it as invalid use <a href="socket.html#socketinvalid"><tt>_SOCKETINVALID</tt></a>.
450</p>
451
452<p class="return">
453No return value.
454</p>
455
456<p class="note">
457Note: <b>This is an internal method. Unlikely to be
458portable. 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">