Linux server1.hosting4iran.com 4.18.0-553.89.1.el8_10.x86_64 #1 SMP Mon Dec 8 03:53:08 EST 2025 x86_64
LiteSpeed
Server IP : 185.208.174.156 & Your IP : 216.73.216.218
Domains : 282 Domain
User : satitravel
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
lua-socket /
Delete
Unzip
Name
Size
Permission
Date
Action
README
237
B
-rw-r--r--
2013-06-14 11:27
dns.html
4.6
KB
-rw-r--r--
2013-06-14 11:27
ftp.html
9.34
KB
-rw-r--r--
2013-06-14 11:27
http.html
11.18
KB
-rw-r--r--
2013-06-14 11:27
index.html
7.39
KB
-rw-r--r--
2013-06-14 11:27
installation.html
3.79
KB
-rw-r--r--
2013-06-14 11:27
introduction.html
12.14
KB
-rw-r--r--
2013-06-14 11:27
ltn12.html
10.68
KB
-rw-r--r--
2013-06-14 11:27
lua05.ppt
297
KB
-rw-r--r--
2013-06-14 11:27
luasocket.png
11.46
KB
-rw-r--r--
2013-06-14 11:27
mime.html
13.83
KB
-rw-r--r--
2013-06-14 11:27
reference.css
950
B
-rw-r--r--
2013-06-14 11:27
reference.html
7.41
KB
-rw-r--r--
2013-06-14 11:27
smtp.html
14.16
KB
-rw-r--r--
2013-06-14 11:27
socket.html
13.54
KB
-rw-r--r--
2013-06-14 11:27
tcp.html
20.96
KB
-rw-r--r--
2013-06-14 11:27
udp.html
16.52
KB
-rw-r--r--
2013-06-14 11:27
url.html
8.23
KB
-rw-r--r--
2013-06-14 11:27
Save
Rename
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta name="description" content="LuaSocket: DNS support"> <meta name="keywords" content="Lua, LuaSocket, DNS, Network, Library, Support"> <title>LuaSocket: DNS support</title> <link rel="stylesheet" href="reference.css" type="text/css"> </head> <body> <!-- header +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <div class=header> <hr> <center> <table summary="LuaSocket logo"> <tr><td align=center><a href="http://www.lua.org"> <img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png"> </a></td></tr> <tr><td align=center valign=top>Network support for the Lua language </td></tr> </table> <p class=bar> <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> </p> </center> <hr> </div> <!-- dns ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <h2 id=dns>DNS</h2> <p> 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> resolved4 = {<br> name = <i>canonic-name</i>,<br> alias = <i>alias-list</i>,<br> ip = <i>ip-address-list</i><br> } </tt> </blockquote> <p> 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> socket.dns.<b>gethostname()</b> </p> <p class=description> Returns the standard host name for the machine as a string. </p> <!-- tohostname +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class=name id=tohostname> socket.dns.<b>tohostname(</b>address<b>)</b> </p> <p class=description> Converts from IPv4 address to host name. </p> <p class=parameters> <tt>Address</tt> can be an IP address or host name. </p> <p class=return> The function returns a string with the canonic host name of the given <tt>address</tt>, followed by 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> <!-- toip +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <p class=name id=toip> socket.dns.<b>toip(</b>address<b>)</b> </p> <p class=description> Converts from host name to IPv4 address. </p> <p class=parameters> <tt>Address</tt> can be an IP address or host name. </p> <p class=return> Returns a string with the first IP address found for <tt>address</tt>, followed by 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> <!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <div class=footer> <hr> <center> <p class=bar> <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> </p> <p> <small> Last modified by Diego Nehab on <br> Thu Apr 20 00:25:07 EDT 2006 </small> </p> </center> </div> </body> </html>