diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luasocket/doc')
14 files changed, 602 insertions, 283 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/dns.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/dns.html index f4c3b07d2b7..c4a0472e23e 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/dns.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/dns.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -39,12 +39,16 @@ <h2 id=dns>DNS</h2> <p> -Name resolution functions return <em>all</em> information obtained from the -resolver in a table of the form: +IPv4 name resolution functions +<a href=#toip><tt>dns.toip</tt></a> +and +<a href=#tohostname><tt>dns.tohostname</tt></a> +return <em>all</em> information obtained from +the resolver in a table of the form: </p> <blockquote><tt> -resolved = {<br> +resolved4 = {<br> name = <i>canonic-name</i>,<br> alias = <i>alias-list</i>,<br> ip = <i>ip-address-list</i><br> @@ -55,6 +59,53 @@ resolved = {<br> Note that the <tt>alias</tt> list can be empty. </p> +<p> +The more general name resolution function +<a href=#getaddrinfo><tt>dns.getaddrinfo</tt></a>, which +supports both IPv6 and IPv4, +returns <em>all</em> information obtained from +the resolver in a table of the form: +</p> + +<blockquote><tt> +resolved6 = {<br> + [1] = {<br> + family = <i>family-name-1</i>,<br> + addr = <i>address-1</i><br> + },<br> + ...<br> + [n] = {<br> + family = <i>family-name-n</i>,<br> + addr = <i>address-n</i><br> + }<br> +} +</tt> </blockquote> + +<p> +Here, <tt>family</tt> contains the string <tt>"inet"</tt> for IPv4 +addresses, and <tt>"inet6"</tt> for IPv6 addresses. +</p> + +<!-- getaddrinfo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class=name id=getaddrinfo> +socket.dns.<b>getaddrinfo(</b>address<b>)</b> +</p> + +<p class=description> +Converts from host name to address. +</p> + +<p class=parameters> +<tt>Address</tt> can be an IPv4 or IPv6 address or host name. +</p> + +<p class=return> +The function returns a table with all information returned by +the resolver. In case of error, the function returns <b><tt>nil</tt></b> +followed by an error message. +</p> + <!-- gethostname ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class=name id=gethostname> @@ -72,7 +123,7 @@ socket.dns.<b>tohostname(</b>address<b>)</b> </p> <p class=description> -Converts from IP address to host name. +Converts from IPv4 address to host name. </p> <p class=parameters> @@ -93,7 +144,7 @@ socket.dns.<b>toip(</b>address<b>)</b> </p> <p class=description> -Converts from host name to IP address. +Converts from host name to IPv4 address. </p> <p class=parameters> @@ -113,8 +164,8 @@ message. <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/ftp.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/ftp.html index 9884f31339d..3f23a4a93cc 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/ftp.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/ftp.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -42,7 +42,7 @@ FTP (File Transfer Protocol) is a protocol used to transfer files between hosts. The <tt>ftp</tt> namespace offers thorough support to FTP, under a simple interface. The implementation conforms to -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc0959.txt">RFC 959</a>. +<a href="http://www.ietf.org/rfc/rfc959.txt">RFC 959</a>. </p> <p> @@ -70,8 +70,8 @@ local ftp = require("socket.ftp") <p> URLs MUST conform to -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc1738.txt">RFC -1738</a>, that is, an URL is a string in the form: +<a href="http://www.ietf.org/rfc/rfc1738.txt">RFC 1738</a>, +that is, an URL is a string in the form: </p> <blockquote> @@ -270,8 +270,8 @@ f, e = ftp.put{ <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/http.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/http.html index 0acac13feec..cd41c0ddb9e 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/http.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/http.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="introduction.html">introduction</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -36,7 +36,7 @@ <!-- http +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<h2 id=http>HTTP</h2> +<h2 id="http">HTTP</h2> <p> HTTP (Hyper Text Transfer Protocol) is the protocol used to exchange @@ -45,8 +45,7 @@ namespace offers full support for the client side of the HTTP protocol (i.e., the facilities that would be used by a web-browser implementation). The implementation conforms to the HTTP/1.1 standard, -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2616.txt">RFC -2616</a>. +<a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>. </p> <p> @@ -67,8 +66,7 @@ local http = require("socket.http") <p> URLs must conform to -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc1738.txt">RFC -1738</a>, +<a href="http://www.ietf.org/rfc/rfc1738.txt">RFC 1738</a>, that is, an URL is a string in the form: </p> @@ -97,8 +95,9 @@ headers = {<br> </blockquote> <p> -Field names are case insensitive (as specified by the standard) and all -functions work with lowercase field names. +Field names are case insensitive (as specified by the standard) and all +functions work with lowercase field names (but see +<a href=socket.html#headers.canonic><tt>socket.headers.canonic</tt></a>). Field values are left unmodified. </p> @@ -119,9 +118,10 @@ the HTTP module: <li> <tt>USERAGENT</tt>: default user agent reported to server. </ul> + <!-- http.request ++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=request> +<p class=name id="request"> http.<b>request(</b>url [, body]<b>)</b><br> http.<b>request{</b><br> url = <i>string</i>,<br> @@ -199,8 +199,7 @@ it usually returns a message body (a web page informing the URL was not found or some other useless page). To make sure the operation was successful, check the returned status <tt>code</tt>. For a list of the possible values and their meanings, refer to <a -href="http://www.cs.princeton.edu/~diego/rfc/rfc2616.txt">RFC -2616</a>. +href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>. </p> <p class=description> @@ -259,7 +258,7 @@ r, c, h = http.request { -- } </pre> -<p class=note id=post> +<p class=note id="post"> Note: When sending a POST request, simple interface adds a "<tt>Content-type: application/x-www-form-urlencoded</tt>" header to the request. This is the type used by @@ -267,7 +266,7 @@ HTML forms. If you need another type, use the generic interface. </p> -<p class=note id=authentication> +<p class=note id="authentication"> Note: Some URLs are protected by their servers from anonymous download. For those URLs, the server must receive some sort of authentication along with the request or it will deny @@ -278,7 +277,7 @@ download and return status "401 Authentication Required". The HTTP/1.1 standard defines two authentication methods: the Basic Authentication Scheme and the Digest Authentication Scheme, both explained in detail in -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2068.txt">RFC 2068</a>. +<a href="http://www.ietf.org/rfc/rfc2068.txt">RFC 2068</a>. </p> <p class=note>The Basic Authentication Scheme sends @@ -304,7 +303,7 @@ b, c, h = http.request("http://fulano:silva@www.example.com/private/index.html") -- the request directly. r, c = http.request { url = "http://www.example.com/private/index.html", - headers = { authentication = "Basic " .. (mime.b64("fulano:silva")) } + headers = { authorization = "Basic " .. (mime.b64("fulano:silva")) } } </pre> @@ -314,8 +313,8 @@ r, c = http.request { <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/index.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/index.html index 57a790714ac..d8ee4a492d2 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/index.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/index.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -78,8 +78,8 @@ LuaSocket. </p> <p> -Copyright © 2004-2007 Diego Nehab. All rights reserved. <br> -Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a> +Copyright © 1999-2012 Diego Nehab. All rights reserved. <br> +Author: <A href="http://www.impa.br/~diego">Diego Nehab</a> </p> <!-- download +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> @@ -87,25 +87,18 @@ Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a> <h2 id=download>Download</h2> <p> -LuaSocket version 2.0.2 is now available for download! It is -compatible with Lua 5.1, and has +LuaSocket version 2.1-rc1 is now available for download! +It is compatible with Lua 5.1 and 5.2, and has been tested on Windows XP, Linux, and Mac OS X. Chances are it works well on most UNIX distributions and Windows flavors. </p> <p> The library can be downloaded in source code from the -<a href=http://luaforge.net/projects/luasocket/>LuaSocket -project page</a> at LuaForge. -Besides the full C and Lua source code for the library, the distribution -contains several examples, this user's manual and basic test procedures. -</p> - -<p> -Danilo Tuler is maintaining Win32 binaries for LuaSocket, which are also -available from LuaForge. These are compatible with the -<a href=http://luaforge.net/projects/luabinaries>LuaBinaries</a>, -also available from LuaForge. +<a href="https://github.com/diegonehab/luasocket/downloads">LuaSocket +project page</a> at GitHub. Besides the full C and Lua source code +for the library, the distribution contains several examples, +this user's manual and basic test procedures. </p> <p> Take a look at the <a @@ -118,14 +111,13 @@ manual to find out how to properly install the library. <h2 id=thanks>Special thanks</h2> <p> -Throughout LuaSocket's history, many people gave suggestions that helped -improve it. For that, I thank the Lua community. -Special thanks go to -David Burgess, who has helped push the library to a new level of quality and -from whom I have learned a lot of stuff that doesn't show up in RFCs. -Special thanks also to Carlos Cassino, who played a big part in the -extensible design seen in the C core of LuaSocket 2.0. Mike Pall -has been helping a lot too! Thanks to you all! +This marks the first release of LuaSocket that +wholeheartedly embraces the open-source development +philosophy. After a long hiatus, Matthew Wild finally +convinced me it was time for a release including IPv6 +and Lua 5.2 support. Special thanks to Sam Roberts, Florian +Zeitz, and Paul Aurich, Liam Devine, and everybody else that +has helped bring this library back to life. </p> <!-- whatsnew +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> @@ -133,44 +125,30 @@ has been helping a lot too! Thanks to you all! <h2 id=new>What's New</h2> <p> -2.0.2 is just a bug-fix/update release. +Main changes for LuaSocket 2.1-rc1 are IPv6 support +and Lua 5.2 compatibility. </p> <ul> -<li> Improved: http.request() now supports deprecated -HTTP/0.9 servers (Florian Berger); -<li> Fixed: could return "timedout" instead of "timeout" (Leo Leo); -<li> Fixed: crash when reading '*a' on closed socket (Paul Ducklin); -<li> Fixed: return values are consistent when reading from closed sockets; -<li> Fixed: case sensitivity in headers of multipart -messages in smtp.message() (Graham Henstridge); -<li> Fixed a couple instances of error() being called instead of -base.error(). These would cause an error when an error was -reported :) (Ketmar Dark); -<li> Fixed: test script now uses pairs() iterator instead -of the old Lua syntax (Robert Dodier). -</ul> - -<p> -2.0.1 is just a bug-fix/update release. -</p> - +<li> Added: Compatible with Lua 5.2 (using <tt>LUA_COMPAT_MODULE</tt>); +<li> Added: IPv6 support; <ul> -<li> Updated: now using <tt>compat-5.1r5</tt>; -<li> Improved: <tt>http.request</tt> is more robust to -malformed URLs (Adrian Sietsma); -<li> Improved: the simple <tt>http.request</tt> interface sends a -"<tt>Content-type: application/x-www-form-urlencoded</tt>" -header (William Trenker); -<li> Improved: <tt>http.request</tt> is robust to evil -servers that send inappropriate 100-continue messages -(David Burgess); -<li> Fixed: <tt>http.request</tt> was using the old host header during -redirects (Florian Berger); -<li> Fixed: sample <tt>unix.c</tt> had fallen through the -cracks during development (Matthew Percival); -<li> Fixed: error code was not being propagated correctly in -ftp.lua (David Burgess). +<li> <tt>Socket.connect</tt> and <tt>socket.bind</tt> support IPv6 addresses; +<li> <tt>Getpeername</tt> and <tt>getsockname</tt> support +IPv6 addresses, and return the socket family as a third value; +<li> URL module updated to support IPv6 host names; +<li> New <tt>socket.tcp6</tt> and <tt>socket.udp6</tt> functions; +<li> New <tt>socket.dns.getaddrinfo</tt> function; +</ul> +<li> Added: <tt>getoption</tt> method; +<li> Fixed: <tt>url.unescape</tt> was returning additional values; +<li> Fixed: <tt>mime.qp</tt>, <tt>mime.unqp</tt>, + <tt>mime.b64</tt>, and <tt>mime.unb64</tt> could + mistaking their own stack slots for functions arguments; +<li> Fixed: Receiving zero-length datagram is now possible; +<li> Improved: Hidden all internal library symbols; +<li> Improved: Better error messages; +<li> Improved: Better documentation of socket options. </ul> <!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> @@ -179,7 +157,7 @@ ftp.lua (David Burgess). <p> All previous versions of the LuaSocket library can be downloaded <a -href="http://www.cs.princeton.edu/~diego/professional/luasocket/old"> +href="http://www.impa.br/~diego/software/luasocket/old"> here</a>. Although these versions are no longer supported, they are still available for those that have compatibility issues. </p> @@ -190,7 +168,7 @@ still available for those that have compatibility issues. <hr> <center> <p class=bar> -<a href="home.html#download">download</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -198,7 +176,7 @@ still available for those that have compatibility issues. <p> <small> Last modified by Diego Nehab on <br> -Wed Oct 3 02:07:59 BRT 2007 +Mon Apr 16 21:58:56 HKT 2012 </small> </p> </center> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/installation.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/installation.html index 0288f4af31a..37c309b5d24 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/installation.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/installation.html @@ -25,8 +25,8 @@ Installation"> </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -39,24 +39,16 @@ Installation"> <h2>Installation</h2> -<p> LuaSocket 2.0.2 uses the new package system for Lua 5.1. -All Lua library developers are encouraged to update their libraries so that -all libraries can coexist peacefully and users can benefit from the -standardization and flexibility of the standard. -</p> - -<p> -Those stuck with Lua 5.0 will need the -<a href=http://www.keplerproject.org/compat/>compat-5.1</a> -module. It is maintained by -<a href=http://www.keplerproject.org/>The Kepler -Project</a>'s team, and implements the Lua 5.1 package proposal -on top of Lua 5.0. </p> +<p> LuaSocket 2.1-rc still uses Lua 5.1's package +system. Users that have already made the switch to +Lua 5.2 should leave the default +<tt>LUA_COMPAT_MODULE</tt> defined when compiling their Lua +distribution for compatibility with LuaSocket. </p> -<p> Here we will only describe the standard distribution. -If the standard doesn't meet your needs, we refer you to the -Lua discussion list, where any question about the package -scheme will likely already have been answered. </p> +<p> Here we describe the standard distribution. If the +standard doesn't meet your needs, we refer you to the Lua +discussion list, where any question about the package scheme +will likely already have been answered. </p> <h3>Directory structure</h3> @@ -64,14 +56,19 @@ scheme will likely already have been answered. </p> directories, one for system dependent files, and another for system independent files. Let's call these directories <tt><CDIR></tt> and <tt><LDIR></tt>, respectively. -For instance, in my laptop, I use '<tt>/usr/local/lib/lua/5.0</tt>' for -<tt><CDIR></tt> and '<tt>/usr/local/share/lua/5.0</tt>' for -<tt><LDIR></tt>. On Windows, sometimes only one directory is used, say -'<tt>c:\program files\lua\5.0</tt>'. Here is the standard LuaSocket +For example, in my laptp, Lua 5.1 is configured to +use '<tt>/usr/local/lib/lua/5.1</tt>' for +<tt><CDIR></tt> and '<tt>/usr/local/share/lua/5.1</tt>' for +<tt><LDIR></tt>. On Windows, <tt><CDIR></tt> +usually points to the directory where the Lua executable is +found, and <tt><LDIR></tt> points to a +<tt>lua/</tt> directory inside <tt><CDIR></tt>. (These +settings can be overridden by environment variables +<tt>LUA_PATH</tt> and <tt>LUA_CPATH</tt>. See the Lua +documentation for details.) Here is the standard LuaSocket distribution directory structure:</p> <pre class=example> -<LDIR>/compat-5.1.lua <LDIR>/ltn12.lua <LDIR>/socket.lua <CDIR>/socket/core.dll @@ -88,33 +85,6 @@ distribution directory structure:</p> would be replaced by <tt>core.so</tt>. </p> -<p> In order for the interpreter to find all LuaSocket components, three -environment variables need to be set. The first environment variable tells -the interpreter to load the <tt>compat-5.1.lua</tt> module at startup: </p> - -<pre class=example> -LUA_INIT=@<LDIR>/compat-5.1.lua -</pre> - -<p> -This is only need for Lua 5.0! Lua 5.1 comes with -the package system built in, of course. -</p> - -<p> -The other two environment variables instruct the compatibility module to -look for dynamic libraries and extension modules in the appropriate -directories and with the appropriate filename extensions. -</p> - -<pre class=example> -LUA_PATH=<LDIR>/?.lua;?.lua -LUA_CPATH=<CDIR>/?.dll;?.dll -</pre> - -<p> Again, naturally, on Unix systems the shared library extension would be -<tt>.so</tt> instead of <tt>.dll</tt>.</p> - <h3>Using LuaSocket</h3> <p> With the above setup, and an interpreter with shared library support, @@ -122,19 +92,19 @@ it should be easy to use LuaSocket. Just fire the interpreter and use the <tt>require</tt> function to gain access to whatever module you need:</p> <pre class=example> -Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio +Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio > socket = require("socket") > print(socket._VERSION) ---> LuaSocket 2.0.2 +--> LuaSocket 2.1-rc1 </pre> <p> Each module loads their dependencies automatically, so you only need to load the modules you directly depend upon: </p> <pre class=example> -Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio +Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio > http = require("socket.http") -> print(http.request("http://www.cs.princeton.edu/~diego/professional/luasocket")) +> print(http.request("http://www.impa.br/~diego/software/luasocket")) --> homepage gets dumped to terminal </pre> @@ -144,8 +114,8 @@ Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -153,7 +123,7 @@ Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio <p> <small> Last modified by Diego Nehab on <br> -Thu Apr 20 00:25:30 EDT 2006 +Mon Apr 16 21:01:42 HKT 2012 </small> </p> </center> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/introduction.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/introduction.html index eff63676750..fd22f483deb 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/introduction.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/introduction.html @@ -25,8 +25,8 @@ Library, Support"> </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -314,8 +314,8 @@ and many others are covered by the <a href=reference.html>reference manual</a>. <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/ltn12.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/ltn12.html index 001395030af..7e2f49a8c4c 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/ltn12.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/ltn12.html @@ -25,8 +25,8 @@ Pump, Support, Library"> </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -411,8 +411,8 @@ Creates and returns a source that produces the contents of a <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/mime.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/mime.html index d7faf52cbcb..ae136fd85d1 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/mime.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/mime.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -44,11 +44,11 @@ content transfer encodings, such as Base64 and Quoted-Printable. It also provides functions to break text into lines and change the end-of-line convention. MIME is described mainly in -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2045.txt">RFC 2045</a>, -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2046.txt">2046</a>, -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2047.txt">2047</a>, -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2047.txt">2048</a>, and -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2048.txt">2049</a>. +<a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>, +<a href="http://www.ietf.org/rfc/rfc2046.txt">2046</a>, +<a href="http://www.ietf.org/rfc/rfc2047.txt">2047</a>, +<a href="http://www.ietf.org/rfc/rfc2047.txt">2048</a>, and +<a href="http://www.ietf.org/rfc/rfc2048.txt">2049</a>. </p> <p> @@ -457,8 +457,8 @@ marker. <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/reference.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/reference.html index b329f57f58b..e9bb5eb6fcc 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/reference.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/reference.html @@ -25,8 +25,8 @@ Support, Manual"> </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -42,9 +42,10 @@ Support, Manual"> <blockquote> <a href="dns.html">DNS (in socket)</a> <blockquote> -<a href="dns.html#toip">toip</a>, +<a href="dns.html#getaddrinfo">getaddrinfo</a>, +<a href="dns.html#gethostname">gethostname</a>, <a href="dns.html#tohostname">tohostname</a>, -<a href="dns.html#gethostname">gethostname</a>. +<a href="dns.html#toip">toip</a>. </blockquote> </blockquote> @@ -108,9 +109,9 @@ Support, Manual"> <a href="mime.html">MIME</a> <blockquote> <a href="mime.html#high">high-level</a>: -<a href="mime.html#normalize">normalize</a>, <a href="mime.html#decode">decode</a>, <a href="mime.html#encode">encode</a>, +<a href="mime.html#normalize">normalize</a>, <a href="mime.html#stuff">stuff</a>, <a href="mime.html#wrap">wrap</a>. </blockquote> @@ -120,10 +121,10 @@ Support, Manual"> <a href="mime.html#dot">dot</a>, <a href="mime.html#eol">eol</a>, <a href="mime.html#qp">qp</a>, -<a href="mime.html#wrp">wrp</a>, -<a href="mime.html#qpwrp">qpwrp</a>. +<a href="mime.html#qpwrp">qpwrp</a>, <a href="mime.html#unb64">unb64</a>, <a href="mime.html#unqp">unqp</a>, +<a href="mime.html#wrp">wrp</a>. </blockquote> </blockquote> @@ -142,19 +143,27 @@ Support, Manual"> <blockquote> <a href="socket.html">Socket</a> <blockquote> +<a href="socket.html#bind">bind</a>, +<a href="socket.html#connect">connect</a>, +<a href="socket.html#connect">connect4</a>, +<a href="socket.html#connect">connect6</a>, <a href="socket.html#debug">_DEBUG</a>, <a href="dns.html#dns">dns</a>, <a href="socket.html#gettime">gettime</a>, +<a href="socket.html#headers.canonic">headers.canonic</a>, <a href="socket.html#newtry">newtry</a>, <a href="socket.html#protect">protect</a>, <a href="socket.html#select">select</a>, <a href="socket.html#sink">sink</a>, <a href="socket.html#skip">skip</a>, <a href="socket.html#sleep">sleep</a>, +<a href="socket.html#setsize">_SETSIZE</a>, <a href="socket.html#source">source</a>, -<a href="tcp.html#tcp">tcp</a>, +<a href="tcp.html#socket.tcp">tcp</a>, +<a href="tcp.html#socket.tcp6">tcp6</a>, <a href="socket.html#try">try</a>, -<a href="udp.html#udp">udp</a>, +<a href="udp.html#socket.udp">udp</a>, +<a href="udp.html#socket.udp6">udp6</a>, <a href="socket.html#version">_VERSION</a>. </blockquote> </blockquote> @@ -168,11 +177,16 @@ Support, Manual"> <a href="tcp.html#bind">bind</a>, <a href="tcp.html#close">close</a>, <a href="tcp.html#connect">connect</a>, +<a href="tcp.html#dirty">dirty</a>, +<a href="tcp.html#getfd">getfd</a>, +<a href="tcp.html#getoption">getoption</a>, <a href="tcp.html#getpeername">getpeername</a>, <a href="tcp.html#getsockname">getsockname</a>, <a href="tcp.html#getstats">getstats</a>, +<a href="tcp.html#listen">listen</a>, <a href="tcp.html#receive">receive</a>, <a href="tcp.html#send">send</a>, +<a href="tcp.html#setfd">setfd</a>, <a href="tcp.html#setoption">setoption</a>, <a href="tcp.html#setstats">setstats</a>, <a href="tcp.html#settimeout">settimeout</a>, @@ -186,6 +200,7 @@ Support, Manual"> <a href="udp.html">UDP (in socket)</a> <blockquote> <a href="udp.html#close">close</a>, +<a href="udp.html#getoption">getoption</a>, <a href="udp.html#getpeername">getpeername</a>, <a href="udp.html#getsockname">getsockname</a>, <a href="udp.html#receive">receive</a>, @@ -220,8 +235,8 @@ Support, Manual"> <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/smtp.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/smtp.html index 27dd4736b4b..bbbff8047b9 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/smtp.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/smtp.html @@ -25,8 +25,8 @@ Library, Support"> </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -48,14 +48,13 @@ control (if you bother to read the code). </p> <p>The implementation conforms to the Simple Mail Transfer Protocol, -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2821.txt">RFC 2821</a>. +<a href="http://www.ietf.org/rfc/rfc2821.txt">RFC 2821</a>. Another RFC of interest is <a -href="http://www.cs.princeton.edu/~diego/rfc/rfc2822.txt">RFC 2822</a>, +href="http://www.ietf.org/rfc/rfc2822.txt">RFC 2822</a>, which governs the Internet Message Format. Multipart messages (those that contain attachments) are part of the MIME standard, but described mainly -in <a href="http://www.cs.princeton.edu/~diego/rfc/rfc2046.txt">RFC -2046</a> +in <a href="http://www.ietf.org/rfc/rfc2046.txt">RFC 2046</a> <p> In the description below, good understanding of <a href="http://lua-users.org/wiki/FiltersSourcesAndSinks"> LTN012, Filters @@ -91,8 +90,9 @@ headers = {<br> </blockquote> <p> -Field names are case insensitive (as specified by the standard) and all -functions work with lowercase field names. +Field names are case insensitive (as specified by the standard) and all +functions work with lowercase field names (but see +<a href=socket.html#headers.canonic><tt>socket.headers.canonic</tt></a>). Field values are left unmodified. </p> @@ -196,7 +196,7 @@ part of the message and will not be sent to anyone. </p> <p class=note> -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2822.txt">RFC 2822</a> +<a href="http://www.ietf.org/rfc/rfc2822.txt">RFC 2822</a> has two <em>important and short</em> sections, "3.6.3. Destination address fields" and "5. Security considerations", explaining the proper use of these headers. Here is a summary of what it says: @@ -236,9 +236,9 @@ exactly what you <em>don't</em> want to happen! <p class=note> I hope this clarifies the issue. Otherwise, please refer to -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2821.txt">RFC 2821</a> +<a href="http://www.ietf.org/rfc/rfc2821.txt">RFC 2821</a> and -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2822.txt">RFC 2822</a>. +<a href="http://www.ietf.org/rfc/rfc2822.txt">RFC 2822</a>. </p> <pre class=example> @@ -398,8 +398,8 @@ r, e = smtp.send{ <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/socket.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/socket.html index ba4b7303e32..b9303cb505a 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/socket.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/socket.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -73,14 +73,19 @@ set to <tt><b>true</b></tt>. <!-- connect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class=name id=connect> -socket.<b>connect(</b>address, port [, locaddr, locport]<b>)</b> +socket.<b>connect[46](</b>address, port [, locaddr] [, locport] [, family]<b>)</b> </p> <p class=description> This function is a shortcut that creates and returns a TCP client object -connected to a remote <tt>host</tt> at a given <tt>port</tt>. Optionally, +connected to a remote <tt>address</tt> at a given <tt>port</tt>. Optionally, the user can also specify the local address and port to bind -(<tt>locaddr</tt> and <tt>locport</tt>). +(<tt>locaddr</tt> and <tt>locport</tt>), or restrict the socket family +to "<tt>inet</tt>" or "<tt>inet6</tt>". +Without specifying <tt>family</tt> to <tt>connect</tt>, whether a tcp or tcp6 +connection is created depends on your system configuration. Two variations +of connect are defined as simple helper functions that restrict the +<tt>family</tt>, <tt>socket.connect4</tt> and <tt>socket.connect6</tt>. </p> <!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> @@ -94,6 +99,47 @@ This constant is set to <tt><b>true</b></tt> if the library was compiled with debug support. </p> +<!-- get time +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class=name id=gettime> +socket.<b>gettime()</b> +</p> + +<p class=description> +Returns the time in seconds, relative to the origin of the +universe. You should subtract the values returned by this function +to get meaningful values. +</p> + +<pre class=example> +t = socket.gettime() +-- do stuff +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> @@ -200,6 +246,15 @@ changed status. </p> <p class=note> +<b>Note: </b>: <tt>select</tt> can monitor a limited number +of sockets, as defined by the constant <tt>socket._SETSIZE</tt>. This +number may be as high as 1024 or as low as 64 by default, +depending on the system. It is usually possible to change this +at compile time. Invoking <tt>select</tt> with a larger +number of sockets will raise an error. +</p> + +<p class=note> <b>Important note</b>: a known bug in WinSock causes <tt>select</tt> to fail on non-blocking TCP sockets. The function may return a socket as writable even though the socket is <em>not</em> ready for sending. @@ -217,6 +272,10 @@ method or <tt>accept</tt> might block forever. it to <tt>select</tt>, it will be ignored. </p> +<p class=note> +<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> + <!-- sink ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class=name id=sink> @@ -288,7 +347,8 @@ Freezes the program execution during a given amount of time. </p> <p class=parameters> -<tt>Time</tt> is the number of seconds to sleep for. +<tt>Time</tt> is the number of seconds to sleep for. If +<tt>time</tt> is negative, the function returns immediately. </p> <!-- source +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> @@ -323,24 +383,17 @@ side closes the connection. The function returns a source with the appropriate behavior. </p> -<!-- time ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> +<!-- setsize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=gettime> -socket.<b>gettime()</b> +<p class=name id=setsize> +socket.<b>_SETSIZE</b> </p> <p class=description> -Returns the time in seconds, relative to the origin of the -universe. You should subtract the values returned by this function -to get meaningful values. +The maximum number of sockets that the <a +href=#select><tt>select</tt></a> function can handle. </p> -<pre class=example> -t = socket.gettime() --- do stuff -print(socket.gettime() - t .. " seconds elapsed") -</pre> - <!-- try ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class=name id=try> @@ -385,8 +438,8 @@ This constant has a string describing the current LuaSocket version. <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/tcp.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/tcp.html index a16a09ed538..151a4c993c1 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/tcp.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/tcp.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -36,16 +36,16 @@ <!-- tcp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<h2 id=tcp>TCP</h2> +<h2 id="tcp">TCP</h2> <!-- socket.tcp +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=socket.tcp> +<p class=name id="socket.tcp"> socket.<b>tcp()</b> </p> <p class=description> -Creates and returns a TCP master object. A master object can +Creates and returns an IPv4 TCP master object. A master object can be transformed into a server object with the method <a href=#listen><tt>listen</tt></a> (after a call to <a href=#bind><tt>bind</tt></a>) or into a client object with @@ -58,9 +58,34 @@ In case of success, a new master object is returned. In case of error, <b><tt>nil</tt></b> is returned, followed by an error message. </p> +<!-- socket.tcp6 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class=name id="socket.tcp6"> +socket.<b>tcp6()</b> +</p> + +<p class=description> +Creates and returns an IPv6 TCP master object. A master object can +be transformed into a server object with the method +<a href=#listen><tt>listen</tt></a> (after a call to <a +href=#bind><tt>bind</tt></a>) or into a client object with +the method <a href=#connect><tt>connect</tt></a>. The only other +method supported by a master object is the +<a href=#close><tt>close</tt></a> method.</p> + +<p class=return> +In case of success, a new master object is returned. In case of error, +<b><tt>nil</tt></b> is returned, followed by an error message. +</p> + +<p class=note> +Note: The TCP object returned will have the option +"<tt>ipv6-v6only</tt>" set to <tt><b>true</b></tt>. +</p> + <!-- accept +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=accept> +<p class=name id="accept"> server:<b>accept()</b> </p> @@ -87,7 +112,7 @@ might block until <em>another</em> client shows up. <!-- bind +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=bind> +<p class=name id="bind"> master:<b>bind(</b>address, port<b>)</b> </p> @@ -100,7 +125,9 @@ local host. <tt>Port</tt> must be an integer number in the range [0..64K). If <tt>address</tt> is '<tt>*</tt>', the system binds to all local interfaces -using the <tt>INADDR_ANY</tt> constant. If <tt>port</tt> is 0, the system automatically +using the <tt>INADDR_ANY</tt> constant or +<tt>IN6ADDR_ANY_INIT</tt>, according to the family. +If <tt>port</tt> is 0, the system automatically chooses an ephemeral port. </p> @@ -116,7 +143,7 @@ is available and is a shortcut for the creation of server sockets. <!-- close ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=close> +<p class=name id="close"> master:<b>close()</b><br> client:<b>close()</b><br> server:<b>close()</b> @@ -139,7 +166,7 @@ automatically closed before destruction, though. <!-- connect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=connect> +<p class=name id="connect"> master:<b>connect(</b>address, port<b>)</b> </p> @@ -180,9 +207,18 @@ href=socket.html#select><tt>socket.select</tt></a> with the socket in the established. </p> +<p class=note> +Note: Starting with LuaSocket 2.1, the host name resolution +depends on whether the socket was created by <a +href=#socket.tcp><tt>socket.tcp</tt></a> or <a +href=#socket.tcp6><tt>socket.tcp6</tt></a>. Addresses from +the appropriate family are tried in succession until the +first success or until the last failure. +</p> + <!-- getpeername ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=getpeername> +<p class=name id="getpeername"> client:<b>getpeername()</b> </p> @@ -191,8 +227,9 @@ Returns information about the remote side of a connected client object. </p> <p class=return> -Returns a string with the IP address of the peer, followed by the -port number that peer is using for the connection. +Returns a string with the IP address of the peer, the +port number that peer is using for the connection, +and a string with the family ("<tt>inet</tt>" or "<tt>inet6</tt>"). In case of error, the method returns <b><tt>nil</tt></b>. </p> @@ -202,7 +239,7 @@ Note: It makes no sense to call this method on server objects. <!-- getsockname ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=getsockname> +<p class=name id="getsockname"> master:<b>getsockname()</b><br> client:<b>getsockname()</b><br> server:<b>getsockname()</b> @@ -213,13 +250,15 @@ Returns the local address information associated to the object. </p> <p class=return> -The method returns a string with local IP address and a number with -the port. In case of error, the method returns <b><tt>nil</tt></b>. +The method returns a string with local IP address, a number with +the local port, +and a string with the family ("<tt>inet</tt>" or "<tt>inet6</tt>"). +In case of error, the method returns <b><tt>nil</tt></b>. </p> <!-- getstats +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=getstats> +<p class=name id="getstats"> master:<b>getstats()</b><br> client:<b>getstats()</b><br> server:<b>getstats()</b><br> @@ -237,7 +276,7 @@ and the age of the socket object in seconds. <!-- listen ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=listen> +<p class=name id="listen"> master:<b>listen(</b>backlog<b>)</b> </p> @@ -265,7 +304,7 @@ method returns <b><tt>nil</tt></b> followed by an error message. <!-- receive ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=receive> +<p class=name id="receive"> client:<b>receive(</b>[pattern [, prefix]]<b>)</b> </p> @@ -297,12 +336,12 @@ of any received data before return. <p class=return> If successful, the method returns the received pattern. In case of error, -the method returns <tt><b>nil</b></tt> followed by an error message which -can be the string '<tt>closed</tt>' in case the connection was +the method returns <tt><b>nil</b></tt> followed by an error +message, followed by a (possibly empty) string containing +the partial that was received. The error message can be +the string '<tt>closed</tt>' in case the connection was closed before the transmission was completed or the string '<tt>timeout</tt>' in case there was a timeout during the operation. -Also, after the error message, the function returns the partial result of -the transmission. </p> <p class=note> @@ -316,7 +355,7 @@ too. <!-- send +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=send> +<p class=name id="send"> client:<b>send(</b>data [, i [, j]]<b>)</b> </p> @@ -354,7 +393,7 @@ instead of calling the method several times. <!-- setoption ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=setoption> +<p class=name id="setoption"> client:<b>setoption(</b>option [, value]<b>)</b><br> server:<b>setoption(</b>option [, value]<b>)</b> </p> @@ -392,21 +431,53 @@ used in validating addresses supplied in a call to <a href=#bind><tt>bind</tt></a> should allow reuse of local addresses; <li> '<tt>tcp-nodelay</tt>': Setting this option to <tt>true</tt> -disables the Nagle's algorithm for the connection. +disables the Nagle's algorithm for the connection; +<li> '<tt>ipv6-v6only</tt>': +Setting this option to <tt>true</tt> restricts an <tt>inet6</tt> socket to +sending and receiving only IPv6 packets. </ul> <p class=return> -The method returns 1 in case of success, or <b><tt>nil</tt></b> otherwise. +The method returns 1 in case of success, or <b><tt>nil</tt></b> +followed by an error message otherwise. </p> <p class=note> Note: The descriptions above come from the man pages. </p> +<!-- getoption ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class=name id="getoption"> +client:<b>getoption(</b>option)</b><br> +server:<b>getoption(</b>option)</b> +</p> + +<p class=description> +Gets options for the TCP object. +See <a href=#setoption><tt>setoption</tt></a> for description of the +option names and values. +</p> + +<p class=parameters> +<tt>Option</tt> is a string with the option name. +<ul> + +<li> '<tt>keepalive</tt>' +<li> '<tt>linger</tt>' +<li> '<tt>reuseaddr</tt>' +<li> '<tt>tcp-nodelay</tt>' +</ul> + +<p class=return> +The method returns the option <tt>value</tt> in case of success, or +<b><tt>nil</tt></b> followed by an error message otherwise. +</p> + <!-- setstats +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=setstats> +<p class=name id="setstats"> master:<b>setstats(</b>received, sent, age<b>)</b><br> client:<b>setstats(</b>received, sent, age<b>)</b><br> server:<b>setstats(</b>received, sent, age<b>)</b><br> @@ -429,7 +500,7 @@ The method returns 1 in case of success and <tt><b>nil</b></tt> otherwise. <!-- settimeout +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=settimeout> +<p class=name id="settimeout"> master:<b>settimeout(</b>value [, mode]<b>)</b><br> client:<b>settimeout(</b>value [, mode]<b>)</b><br> server:<b>settimeout(</b>value [, mode]<b>)</b> @@ -486,7 +557,7 @@ contained verbs making their imperative nature obvious. <!-- shutdown +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=shutdown> +<p class=name id="shutdown"> client:<b>shutdown(</b>mode<b>)</b><br> </p> @@ -508,14 +579,74 @@ This is the default mode; This function returns 1. </p> +<!-- dirty +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class=name id="dirty"> +master:<b>dirty()</b><br> +client:<b>dirty()</b><br> +server:<b>dirty()</b> +</p> + +<p class=description> +Check the read buffer status. +</p> + +<p class=return> +Returns <tt>true</tt> if there is any data in the read buffer, <tt>false</tt> otherwise. +</p> + +<p class=note> +Note: <b>This is an internal method, any use is unlikely to be portable.</b> +</p> + +<!-- getfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class=name id="getfd"> +master:<b>getfd()</b><br> +client:<b>getfd()</b><br> +server:<b>getfd()</b> +</p> + +<p class=description> +Returns the underling socket descriptor or handle associated to the object. +</p> + +<p class=return> +The descriptor or handle. In case the object has been closed, the return will be -1. +</p> + +<p class=note> +Note: <b>This is an internal method, any use is unlikely to be portable.</b> +</p> + +<!-- setfd +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class=name id="setfd"> +master:<b>setfd(</b>fd<b>)</b><br> +client:<b>setfd(</b>fd<b>)</b><br> +server:<b>setfd(</b>fd<b>)</b> +</p> + +<p class=description> +Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made. +</p> + +<p class=return> +No return value. +</p> + +<p class=note> +Note: <b>This is an internal method, any use is unlikely to be portable.</b> +</p> + <!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <div class=footer> <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/udp.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/udp.html index 688649decb9..554fa317688 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/udp.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/udp.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -37,7 +37,7 @@ <!-- udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<h2 id=udp>UDP</h2> +<h2 id="udp">UDP</h2> <!-- socket.udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> @@ -46,10 +46,12 @@ socket.<b>udp()</b> </p> <p class="description"> -Creates and returns an unconnected UDP object. Unconnected objects support the +Creates and returns an unconnected IPv4 UDP object. +Unconnected objects support the <a href="#sendto"><tt>sendto</tt></a>, <a href="#receive"><tt>receive</tt></a>, <a href="#receivefrom"><tt>receivefrom</tt></a>, +<a href="#getoption"><tt>getoption</tt></a>, <a href="#getsockname"><tt>getsockname</tt></a>, <a href="#setoption"><tt>setoption</tt></a>, <a href="#settimeout"><tt>settimeout</tt></a>, @@ -66,6 +68,44 @@ returned. In case of error, <b><tt>nil</tt></b> is returned, followed by an error message. </p> +<!-- socket.udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class="name" id="socket.udp6"> +socket.<b>udp6()</b> +</p> + +<p class="description"> +Creates and returns an unconnected IPv6 UDP object. +Unconnected objects support the +<a href="#sendto"><tt>sendto</tt></a>, +<a href="#receive"><tt>receive</tt></a>, +<a href="#receivefrom"><tt>receivefrom</tt></a>, +<a href="#getoption"><tt>getoption</tt></a>, +<a href="#getsockname"><tt>getsockname</tt></a>, +<a href="#setoption"><tt>setoption</tt></a>, +<a href="#settimeout"><tt>settimeout</tt></a>, +<a href="#setpeername"><tt>setpeername</tt></a>, +<a href="#setsockname"><tt>setsockname</tt></a>, and +<a href="#close"><tt>close</tt></a>. +The <a href="#setpeername"><tt>setpeername</tt></a> +is used to connect the object. +</p> + +<p class="return"> +In case of success, a new unconnected UDP object +returned. In case of error, <b><tt>nil</tt></b> is returned, followed by +an error message. +</p> + +<p class=note> +Note: The TCP object returned will have the option +"<tt>ipv6-v6only</tt>" set to <tt><b>true</b></tt>. +</p> + + + +<!-- close +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + <!-- close +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class="name" id="close"> @@ -100,8 +140,12 @@ Retrieves information about the peer associated with a connected UDP object. </p> -<p class="return"> -Returns the IP address and port number of the peer. + +<p class=return> +Returns a string with the IP address of the peer, the +port number that peer is using for the connection, +and a string with the family ("<tt>inet</tt>" or "<tt>inet6</tt>"). +In case of error, the method returns <b><tt>nil</tt></b>. </p> <p class="note"> @@ -119,10 +163,12 @@ unconnected:<b>getsockname()</b> Returns the local address information associated to the object. </p> -<p class="return"> -The method returns a string with local IP -address and a number with the port. In case of error, the method -returns <b><tt>nil</tt></b>. + +<p class=return> +The method returns a string with local IP address, a number with +the local port, +and a string with the family ("<tt>inet</tt>" or "<tt>inet6</tt>"). +In case of error, the method returns <b><tt>nil</tt></b>. </p> <p class="note"> @@ -177,6 +223,40 @@ address and port as extra return values (and is therefore slightly less efficient). </p> +<!-- getoption +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + +<p class="name" id="getoption"> +connected:<b>getoption()</b><br> +unconnected:<b>getoption()</b> +</p> + +<p class="description"> +Gets an option value from the UDP object. +See <a href=#setoption><tt>setoption</tt></a> for +description of the option names and values. +</p> + +<p class="parameters"><tt>Option</tt> is a string with the option name. +<ul> +<li> '<tt>dontroute</tt>' +<li> '<tt>broadcast</tt>' +<li> '<tt>reuseaddr</tt>' +<li> '<tt>reuseport</tt>' +<li> '<tt>ip-multicast-loop</tt>' +<li> '<tt>ipv6-v6only</tt>' +<li> '<tt>ip-multicast-if</tt>' +<li> '<tt>ip-multicast-ttl</tt>' +<li> '<tt>ip-add-membership</tt>' +<li> '<tt>ip-drop-membership</tt>' +</ul> +</p> + +<p class=return> +The method returns the option <tt>value</tt> in case of +success, or +<b><tt>nil</tt></b> followed by an error message otherwise. +</p> + <!-- send ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class="name" id="send"> @@ -284,6 +364,15 @@ is recommended when the same peer is used for several transmissions and can result in up to 30% performance gains. </p> +<p class=note> +Note: Starting with LuaSocket 2.1, the host name resolution +depends on whether the socket was created by <a +href=#socket.udp><tt>socket.udp</tt></a> or <a +href=#socket.udp6><tt>socket.udp6</tt></a>. Addresses from +the appropriate family are tried in succession until the +first success or until the last failure. +</p> + <!-- setsockname +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class="name" id="setsockname"> @@ -332,23 +421,57 @@ only modify an option if you are sure you need it.</p> name, and <tt>value</tt> depends on the option being set: </p> -<ul> -<li>'<tt>dontroute</tt>': Setting this option to <tt>true</tt> -indicates that outgoing messages should bypass the standard routing -facilities;</li> -<li>'<tt>broadcast</tt>': Setting this option to <tt>true</tt> -requests permission to send broadcast datagrams on the -socket.</li> -</ul> +<ul> +<li> '<tt>dontroute</tt>': Indicates that outgoing +messages should bypass the standard routing facilities. +Receives a boolean value; +<li> '<tt>broadcast</tt>': Requests permission to send +broadcast datagrams on the socket. +Receives a boolean value; +<li> '<tt>reuseaddr</tt>': Indicates that the rules used in +validating addresses supplied in a <tt>bind()</tt> call +should allow reuse of local addresses. +Receives a boolean value; +<li> '<tt>reuseport</tt>': Allows completely duplicate +bindings by multiple processes if they all set +'<tt>reuseport</tt>' before binding the port. +Receives a boolean value; +<li> '<tt>ip-multicast-loop</tt>': +Specifies whether or not a copy of an outgoing multicast +datagram is delivered to the sending host as long as it is a +member of the multicast group. +Receives a boolean value; +<li> '<tt>ipv6-v6only</tt>': +Specifies whether to restrict <tt>inet6</tt> sockets to +sending and receiving only IPv6 packets. +Receive a boolean value; +<li> '<tt>ip-multicast-if</tt>': +Sets the interface over which outgoing multicast datagrams +are sent. +Receives an IP address; +<li> '<tt>ip-multicast-ttl</tt>': +Sets the Time To Live in the IP header for outgoing +multicast datagrams. +Receives a number; +<li> '<tt>ip-add-membership</tt>': +Joins the multicast group specified. +Receives a table with fields +<tt>multiaddr</tt> and <tt>interface</tt>, each containing an +IP address; +<li> '<tt>ip-drop-membership</tt>': Leaves the multicast +group specified. +Receives a table with fields +<tt>multiaddr</tt> and <tt>interface</tt>, each containing an +IP address. +</ul> <p class="return"> The method returns 1 in case of success, or <b><tt>nil</tt></b> followed by an error message otherwise. </p> -<p class="note"> -Note: The descriptions above come from the man -pages. +<p class=note> +Note: The descriptions above come from the man pages. </p> <!-- settimeout +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> @@ -397,8 +520,8 @@ imperative nature obvious. <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> diff --git a/Build/source/texk/web2c/luatexdir/luasocket/doc/url.html b/Build/source/texk/web2c/luatexdir/luasocket/doc/url.html index e87126fa316..6ff673da565 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/doc/url.html +++ b/Build/source/texk/web2c/luatexdir/luasocket/doc/url.html @@ -24,8 +24,8 @@ </td></tr> </table> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#download">download</a> · +<a href="index.html">home</a> · +<a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> @@ -36,14 +36,13 @@ <!-- url ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<h2 id=url>URL</h2> +<h2 id="url">URL</h2> <p> The <tt>url</tt> namespace provides functions to parse, protect, and build URLs, as well as functions to compose absolute URLs from base and relative URLs, according to -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2396.txt">RFC -2396</a>. +<a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>. </p> <p> @@ -70,7 +69,7 @@ An URL is defined by the following grammar: <!-- absolute +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=absolute> +<p class=name id="absolute"> url.<b>absolute(</b>base, relative<b>)</b> </p> @@ -91,7 +90,7 @@ The function returns a string with the absolute URL. <p class=note> Note: The rules that govern the composition are fairly complex, and are described in detail in -<a href="http://www.cs.princeton.edu/~diego/rfc/rfc2396.txt">RFC 2396</a>. +<a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>. The example bellow should give an idea of what the rules are. </p> @@ -126,7 +125,7 @@ g;x?y#s = http://a/b/c/g;x?y#s <!-- build ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=build> +<p class=name id="build"> url.<b>build(</b>parsed_url<b>)</b> </p> @@ -147,7 +146,7 @@ The function returns a string with the built URL. <!-- build_path +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=build_path> +<p class=name id="build_path"> url.<b>build_path(</b>segments, unsafe<b>)</b> </p> @@ -201,7 +200,7 @@ code = url.escape("/#?;") <!-- parse ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=parse> +<p class=name id="parse"> url.<b>parse(</b>url, default<b>)</b> </p> @@ -266,7 +265,7 @@ parsed_url = url.parse("ftp://root:passwd@unsafe.org/pub/virus.exe;type=i") <!-- parse_path +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> -<p class=name id=parse_path> +<p class=name id="parse_path"> url.<b>parse_path(</b>path<b>)</b> </p> @@ -310,8 +309,8 @@ The function returns the decoded string. <hr> <center> <p class=bar> -<a href="home.html">home</a> · -<a href="home.html#down">download</a> · +<a href="index.html">home</a> · +<a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> |