diff --git a/doc/dns.html b/doc/dns.html index c4a0472..56ce3ba 100644 --- a/doc/dns.html +++ b/doc/dns.html @@ -1,4 +1,4 @@ - @@ -13,22 +13,22 @@ -
+

- -
-LuaSocket +
+LuaSocket
Network support for the Lua language +
Network support for the Lua language
-

+

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


@@ -36,14 +36,14 @@ -

DNS

+

DNS

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

@@ -60,10 +60,10 @@ Note that the alias list can be empty.

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

@@ -88,82 +88,82 @@ addresses, and "inet6" for IPv6 addresses. -

+

socket.dns.getaddrinfo(address)

-

-Converts from host name to address. +

+Converts from host name to address.

-

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

+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. +followed by an error message.

-

+

socket.dns.gethostname()

-

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

+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. +

+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. +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. +

+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. +message.

-