aboutsummaryrefslogtreecommitdiff
path: root/docs/socket.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/socket.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 'docs/socket.html')
-rw-r--r--docs/socket.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/socket.html b/docs/socket.html
index 570f6d5..de43135 100644
--- a/docs/socket.html
+++ b/docs/socket.html
@@ -51,6 +51,14 @@ To obtain the <tt>socket</tt> namespace, run:
51local socket = require("socket") 51local socket = require("socket")
52</pre> 52</pre>
53 53
54<p>
55Two related transports are shipped as separate modules, loaded on demand
56with their own <tt>require</tt> call: <a href="unix.html">Unix domain
57sockets</a> (<tt>require("socket.unix")</tt>) and
58<a href="serial.html">serial ports</a> (<tt>require("socket.serial")</tt>).
59Both are only built on Unix-like platforms.
60</p>
61
54<!-- headers.canonic ++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 62<!-- headers.canonic ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
55 63
56<p class="name" id="headers.canonic"> 64<p class="name" id="headers.canonic">
@@ -94,6 +102,27 @@ local headers = require("socket.headers")
94headers.setcanonic("X-Request-ID") 102headers.setcanonic("X-Request-ID")
95</pre> 103</pre>
96 104
105<!-- headers.setcanonic +++++++++++++++++++++++++++++++++++++++++++++++++ -->
106
107<p class="name" id="headers.setcanonic">
108socket.headers.<b>setcanonic(</b>name<b>)</b>
109</p>
110
111<p class="description">
112Registers a custom canonic capitalization for a header field name in
113<a href="#headers.canonic"><tt>socket.headers.canonic</tt></a>, for use
114when the automatic capitalize-first-letter-of-each-word rule would not
115reproduce it (e.g. an all-caps acronym).
116</p>
117
118<p class="parameters">
119<tt>Name</tt> is a string with the header field name in its desired
120canonic capitalization (e.g. <tt>"X-Request-ID"</tt>).
121</p>
122
123<p class="return">
124No return value.
125</p>
97 126
98<!-- bind ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 127<!-- bind ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
99 128