aboutsummaryrefslogtreecommitdiff
path: root/doc/socket.html
diff options
context:
space:
mode:
authorDiego Nehab <diego.nehab@gmail.com>2016-03-04 15:36:32 -0300
committerDiego Nehab <diego.nehab@gmail.com>2016-03-04 15:36:32 -0300
commit944305dc21350fd2ec32a9552d893da86894fd62 (patch)
tree82948c24dade5e0da6924ab5e706f146bce4692a /doc/socket.html
parentcdce73b226cc4da6a073b79bec02a6780d32ff1a (diff)
downloadluasocket-944305dc21350fd2ec32a9552d893da86894fd62.tar.gz
luasocket-944305dc21350fd2ec32a9552d893da86894fd62.tar.bz2
luasocket-944305dc21350fd2ec32a9552d893da86894fd62.zip
Added gettimeout for completeness.
Also documented. Rordered manuals so order is alphabetical.
Diffstat (limited to 'doc/socket.html')
-rw-r--r--doc/socket.html70
1 files changed, 36 insertions, 34 deletions
diff --git a/doc/socket.html b/doc/socket.html
index a99d71b..35f8391 100644
--- a/doc/socket.html
+++ b/doc/socket.html
@@ -51,6 +51,30 @@ To obtain the <tt>socket</tt> namespace, run:
51local socket = require("socket") 51local socket = require("socket")
52</pre> 52</pre>
53 53
54<!-- headers.canonic ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
55
56<p class=name id="headers.canonic">
57socket.headers.<b>canonic</b></p>
58
59<p> The <tt>socket.headers.canonic</tt> table
60is used by the HTTP and SMTP modules to translate from
61lowercase field names back into their canonic
62capitalization. When a lowercase field name exists as a key
63in this table, the associated value is substituted in
64whenever the field name is sent out.
65</p>
66
67<p>
68You can obtain the <tt>headers</tt> namespace if case run-time
69modifications are required by running:
70</p>
71
72<pre class=example>
73-- loads the headers module
74local headers = require("headers")
75</pre>
76
77
54<!-- bind ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 78<!-- bind ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
55 79
56<p class=name id=bind> 80<p class=name id=bind>
@@ -129,29 +153,6 @@ t = socket.gettime()
129print(socket.gettime() - t .. " seconds elapsed") 153print(socket.gettime() - t .. " seconds elapsed")
130</pre> 154</pre>
131 155
132<!-- socket.headers ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
133
134<p class=name id="headers.canonic">
135socket.headers.<b>canonic</b></p>
136
137<p> The <tt>socket.headers.canonic</tt> table
138is used by the HTTP and SMTP modules to translate from
139lowercase field names back into their canonic
140capitalization. When a lowercase field name exists as a key
141in this table, the associated value is substituted in
142whenever the field name is sent out.
143</p>
144
145<p>
146You can obtain the <tt>headers</tt> namespace if case run-time
147modifications are required by running:
148</p>
149
150<pre class=example>
151-- loads the headers module
152local headers = require("headers")
153</pre>
154
155<!-- newtry +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 156<!-- newtry +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
156 157
157<p class=name id=newtry> 158<p class=name id=newtry>
@@ -283,6 +284,18 @@ it to <tt>select</tt>, it will be ignored.
283<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. 284<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.
284</p> 285</p>
285 286
287<!-- setsize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
288
289<p class=name id=setsize>
290socket.<b>_SETSIZE</b>
291</p>
292
293<p class=description>
294The maximum number of sockets that the <a
295href=#select><tt>select</tt></a> function can handle.
296</p>
297
298
286<!-- sink ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 299<!-- sink ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
287 300
288<p class=name id=sink> 301<p class=name id=sink>
@@ -390,17 +403,6 @@ side closes the connection.
390The function returns a source with the appropriate behavior. 403The function returns a source with the appropriate behavior.
391</p> 404</p>
392 405
393<!-- setsize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
394
395<p class=name id=setsize>
396socket.<b>_SETSIZE</b>
397</p>
398
399<p class=description>
400The maximum number of sockets that the <a
401href=#select><tt>select</tt></a> function can handle.
402</p>
403
404<!-- socketinvalid ++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 406<!-- socketinvalid ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
405 407
406<p class=name id=socketinvalid> 408<p class=name id=socketinvalid>