mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-08-28 06:42:25 +02:00
Added gettimeout for completeness.
Also documented. Rordered manuals so order is alphabetical.
This commit is contained in:
@@ -51,6 +51,30 @@ To obtain the <tt>socket</tt> namespace, run:
|
||||
local socket = require("socket")
|
||||
</pre>
|
||||
|
||||
<!-- headers.canonic ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<p class=name id="headers.canonic">
|
||||
socket.headers.<b>canonic</b></p>
|
||||
|
||||
<p> The <tt>socket.headers.canonic</tt> table
|
||||
is used by the HTTP and SMTP modules to translate from
|
||||
lowercase field names back into their canonic
|
||||
capitalization. When a lowercase field name exists as a key
|
||||
in this table, the associated value is substituted in
|
||||
whenever the field name is sent out.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You can obtain the <tt>headers</tt> namespace if case run-time
|
||||
modifications are required by running:
|
||||
</p>
|
||||
|
||||
<pre class=example>
|
||||
-- loads the headers module
|
||||
local headers = require("headers")
|
||||
</pre>
|
||||
|
||||
|
||||
<!-- bind ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<p class=name id=bind>
|
||||
@@ -129,29 +153,6 @@ t = socket.gettime()
|
||||
print(socket.gettime() - t .. " seconds elapsed")
|
||||
</pre>
|
||||
|
||||
<!-- socket.headers ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<p class=name id="headers.canonic">
|
||||
socket.headers.<b>canonic</b></p>
|
||||
|
||||
<p> The <tt>socket.headers.canonic</tt> table
|
||||
is used by the HTTP and SMTP modules to translate from
|
||||
lowercase field names back into their canonic
|
||||
capitalization. When a lowercase field name exists as a key
|
||||
in this table, the associated value is substituted in
|
||||
whenever the field name is sent out.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You can obtain the <tt>headers</tt> namespace if case run-time
|
||||
modifications are required by running:
|
||||
</p>
|
||||
|
||||
<pre class=example>
|
||||
-- loads the headers module
|
||||
local headers = require("headers")
|
||||
</pre>
|
||||
|
||||
<!-- newtry +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<p class=name id=newtry>
|
||||
@@ -283,6 +284,18 @@ it to <tt>select</tt>, it will be ignored.
|
||||
<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.
|
||||
</p>
|
||||
|
||||
<!-- setsize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<p class=name id=setsize>
|
||||
socket.<b>_SETSIZE</b>
|
||||
</p>
|
||||
|
||||
<p class=description>
|
||||
The maximum number of sockets that the <a
|
||||
href=#select><tt>select</tt></a> function can handle.
|
||||
</p>
|
||||
|
||||
|
||||
<!-- sink ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<p class=name id=sink>
|
||||
@@ -390,17 +403,6 @@ side closes the connection.
|
||||
The function returns a source with the appropriate behavior.
|
||||
</p>
|
||||
|
||||
<!-- setsize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<p class=name id=setsize>
|
||||
socket.<b>_SETSIZE</b>
|
||||
</p>
|
||||
|
||||
<p class=description>
|
||||
The maximum number of sockets that the <a
|
||||
href=#select><tt>select</tt></a> function can handle.
|
||||
</p>
|
||||
|
||||
<!-- socketinvalid ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
<p class=name id=socketinvalid>
|
||||
|
Reference in New Issue
Block a user