aboutsummaryrefslogtreecommitdiff
path: root/doc/dns.html
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2003-08-31 01:00:15 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2003-08-31 01:00:15 +0000
commit982781f1464c9b7a8133130433f83dbf1f59a2c0 (patch)
tree8f96f9e9fa1e6bef8b8356037986ddc18673cade /doc/dns.html
parent6789b83ff5c15296267f880d3b98cf8a1800c30a (diff)
downloadluasocket-982781f1464c9b7a8133130433f83dbf1f59a2c0.tar.gz
luasocket-982781f1464c9b7a8133130433f83dbf1f59a2c0.tar.bz2
luasocket-982781f1464c9b7a8133130433f83dbf1f59a2c0.zip
LuaSocket 2.0 User's Manual.
Diffstat (limited to 'doc/dns.html')
-rw-r--r--doc/dns.html120
1 files changed, 120 insertions, 0 deletions
diff --git a/doc/dns.html b/doc/dns.html
new file mode 100644
index 0000000..6abf341
--- /dev/null
+++ b/doc/dns.html
@@ -0,0 +1,120 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4
5<head>
6<title>LuaSocket: Network support for the Lua language</title>
7<link rel="stylesheet" href="reference.css" type="text/css">
8</head>
9
10<body>
11
12<!-- header +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
13
14<div class=header>
15<hr>
16<center>
17<table summary="LuaSocket logo">
18<tr><td align=center><a href="http://www.lua.org">
19<img border=0 alt="LuaSocket" src="luasocket.png">
20</a></td></tr>
21<tr><td align=center valign=top>Network support for the Lua language
22</td></tr>
23</table>
24<p class=bar>
25<a href="home.html">home</a> &middot;
26<a href="home.html#download">download</a> &middot;
27<a href="introduction.html">introduction</a> &middot;
28<a href="reference.html">reference</a>
29</p>
30</center>
31<hr>
32</div>
33
34<!-- dns ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
35
36<h2 id=dns>DNS</h2>
37
38<p>
39The following functions can be used to convert between host names and IP
40addresses. Both functions return <em>all</em> information returned by the
41resolver in a table of the form:
42</p>
43
44<blockquote><tt>
45resolved = {<br>
46&nbsp;&nbsp;name = <i>canonic-name</i>,<br>
47&nbsp;&nbsp;alias = <i>alias-list</i>,<br>
48&nbsp;&nbsp;ip = <i>ip-address-list</i><br>
49}
50</tt> </blockquote>
51
52<p>
53Note that the <tt>alias</tt> list can be empty.
54</p>
55
56<!-- tohostname +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
57
58<p class=name id=tohostname>
59socket.dns.<b>tohostname()</b>
60</p>
61
62<p class=description>
63Converts from IP address to host name.
64</p>
65
66<p class=parameters>
67<tt>Address</tt> can be an IP address or host name.
68</p>
69
70<p class=return>
71The function a string with the canonic host name of the given
72<tt>address</tt>, followed by a table with all information returned by
73the resolver. In case of error, the function returns <tt>nil</tt>
74followed by an error message.
75</p>
76
77
78<!-- toip +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
79
80<p class=name id=toip>
81socket.dns.<b>toip()</b>
82</p>
83
84<p class=description>
85Converts from host name to IP address.
86</p>
87
88<p class=parameters>
89<tt>Address</tt> can be an IP address or host name.
90</p>
91
92<p class=return>
93Returns a string with the first IP address found for <tt>address</tt>,
94followed by a table with all information returned by the resolver.
95In case of error, the function returns <tt>nil</tt> followed by an error
96message.
97</p>
98
99<!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
100
101<div class=footer>
102<hr>
103<center>
104<p class=bar>
105<a href="home.html">home</a> &middot;
106<a href="home.html#down">download</a> &middot;
107<a href="introduction.html">introduction</a> &middot;
108<a href="reference.html">reference</a>
109</p>
110<p>
111<small>
112Last modified by Diego Nehab on <br>
113Sat Aug 9 01:00:41 PDT 2003
114</small>
115</p>
116</center>
117</div>
118
119</body>
120</html>