From f98977b2dac48fc66822402b095336e683715126 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 23 Mar 2022 00:09:53 +0300 Subject: Move doc→docs so we can serve it with GitHub Pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/dns.html | 183 ----------------------------------------------------------- 1 file changed, 183 deletions(-) delete mode 100644 doc/dns.html (limited to 'doc/dns.html') diff --git a/doc/dns.html b/doc/dns.html deleted file mode 100644 index 56ce3ba..0000000 --- a/doc/dns.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - -LuaSocket: DNS support - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

DNS

- -

-IPv4 name resolution functions -dns.toip -and -dns.tohostname -return all information obtained from -the resolver in a table of the form: -

- -
-resolved4 = {
-  name = canonic-name,
-  alias = alias-list,
-  ip = ip-address-list
-} -
- -

-Note that the alias list can be empty. -

- -

-The more general name resolution function -dns.getaddrinfo, which -supports both IPv6 and IPv4, -returns all information obtained from -the resolver in a table of the form: -

- -
-resolved6 = {
-  [1] = {
-    family = family-name-1,
-    addr = address-1
-  },
-  ...
-  [n] = {
-    family = family-name-n,
-    addr = address-n
-  }
-} -
- -

-Here, family contains the string "inet" for IPv4 -addresses, and "inet6" for IPv6 addresses. -

- - - -

-socket.dns.getaddrinfo(address) -

- -

-Converts from host name to address. -

- -

-Address can be an IPv4 or IPv6 address or host name. -

- -

-The function returns a table with all information returned by -the resolver. In case of error, the function returns nil -followed by an error message. -

- - - -

-socket.dns.gethostname() -

- -

-Returns the standard host name for the machine as a string. -

- - - -

-socket.dns.tohostname(address) -

- -

-Converts from IPv4 address to host name. -

- -

-Address can be an IP address or host name. -

- -

-The function returns a string with the canonic host name of the given -address, followed by a table with all information returned by -the resolver. In case of error, the function returns nil -followed by an error message. -

- - - -

-socket.dns.toip(address) -

- -

-Converts from host name to IPv4 address. -

- -

-Address can be an IP address or host name. -

- -

-Returns a string with the first IP address found for address, -followed by a table with all information returned by the resolver. -In case of error, the function returns nil followed by an error -message. -

- - - - - - - -- cgit v1.2.3-55-g6feb