diff options
author | Diego Nehab <diego.nehab@gmail.com> | 2016-03-04 15:36:32 -0300 |
---|---|---|
committer | Diego Nehab <diego.nehab@gmail.com> | 2016-03-04 15:36:32 -0300 |
commit | 944305dc21350fd2ec32a9552d893da86894fd62 (patch) | |
tree | 82948c24dade5e0da6924ab5e706f146bce4692a /doc/socket.html | |
parent | cdce73b226cc4da6a073b79bec02a6780d32ff1a (diff) | |
download | luasocket-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.html | 70 |
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: | |||
51 | local socket = require("socket") | 51 | local socket = require("socket") |
52 | </pre> | 52 | </pre> |
53 | 53 | ||
54 | <!-- headers.canonic ++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
55 | |||
56 | <p class=name id="headers.canonic"> | ||
57 | socket.headers.<b>canonic</b></p> | ||
58 | |||
59 | <p> The <tt>socket.headers.canonic</tt> table | ||
60 | is used by the HTTP and SMTP modules to translate from | ||
61 | lowercase field names back into their canonic | ||
62 | capitalization. When a lowercase field name exists as a key | ||
63 | in this table, the associated value is substituted in | ||
64 | whenever the field name is sent out. | ||
65 | </p> | ||
66 | |||
67 | <p> | ||
68 | You can obtain the <tt>headers</tt> namespace if case run-time | ||
69 | modifications are required by running: | ||
70 | </p> | ||
71 | |||
72 | <pre class=example> | ||
73 | -- loads the headers module | ||
74 | local 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() | |||
129 | print(socket.gettime() - t .. " seconds elapsed") | 153 | print(socket.gettime() - t .. " seconds elapsed") |
130 | </pre> | 154 | </pre> |
131 | 155 | ||
132 | <!-- socket.headers ++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
133 | |||
134 | <p class=name id="headers.canonic"> | ||
135 | socket.headers.<b>canonic</b></p> | ||
136 | |||
137 | <p> The <tt>socket.headers.canonic</tt> table | ||
138 | is used by the HTTP and SMTP modules to translate from | ||
139 | lowercase field names back into their canonic | ||
140 | capitalization. When a lowercase field name exists as a key | ||
141 | in this table, the associated value is substituted in | ||
142 | whenever the field name is sent out. | ||
143 | </p> | ||
144 | |||
145 | <p> | ||
146 | You can obtain the <tt>headers</tt> namespace if case run-time | ||
147 | modifications are required by running: | ||
148 | </p> | ||
149 | |||
150 | <pre class=example> | ||
151 | -- loads the headers module | ||
152 | local 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> | ||
290 | socket.<b>_SETSIZE</b> | ||
291 | </p> | ||
292 | |||
293 | <p class=description> | ||
294 | The maximum number of sockets that the <a | ||
295 | href=#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. | |||
390 | The function returns a source with the appropriate behavior. | 403 | The function returns a source with the appropriate behavior. |
391 | </p> | 404 | </p> |
392 | 405 | ||
393 | <!-- setsize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
394 | |||
395 | <p class=name id=setsize> | ||
396 | socket.<b>_SETSIZE</b> | ||
397 | </p> | ||
398 | |||
399 | <p class=description> | ||
400 | The maximum number of sockets that the <a | ||
401 | href=#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> |