diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-08-31 01:00:15 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-08-31 01:00:15 +0000 |
commit | 982781f1464c9b7a8133130433f83dbf1f59a2c0 (patch) | |
tree | 8f96f9e9fa1e6bef8b8356037986ddc18673cade /doc/dns.html | |
parent | 6789b83ff5c15296267f880d3b98cf8a1800c30a (diff) | |
download | luasocket-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.html | 120 |
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> · | ||
26 | <a href="home.html#download">download</a> · | ||
27 | <a href="introduction.html">introduction</a> · | ||
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> | ||
39 | The following functions can be used to convert between host names and IP | ||
40 | addresses. Both functions return <em>all</em> information returned by the | ||
41 | resolver in a table of the form: | ||
42 | </p> | ||
43 | |||
44 | <blockquote><tt> | ||
45 | resolved = {<br> | ||
46 | name = <i>canonic-name</i>,<br> | ||
47 | alias = <i>alias-list</i>,<br> | ||
48 | ip = <i>ip-address-list</i><br> | ||
49 | } | ||
50 | </tt> </blockquote> | ||
51 | |||
52 | <p> | ||
53 | Note that the <tt>alias</tt> list can be empty. | ||
54 | </p> | ||
55 | |||
56 | <!-- tohostname +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
57 | |||
58 | <p class=name id=tohostname> | ||
59 | socket.dns.<b>tohostname()</b> | ||
60 | </p> | ||
61 | |||
62 | <p class=description> | ||
63 | Converts 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> | ||
71 | The function a string with the canonic host name of the given | ||
72 | <tt>address</tt>, followed by a table with all information returned by | ||
73 | the resolver. In case of error, the function returns <tt>nil</tt> | ||
74 | followed by an error message. | ||
75 | </p> | ||
76 | |||
77 | |||
78 | <!-- toip +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | ||
79 | |||
80 | <p class=name id=toip> | ||
81 | socket.dns.<b>toip()</b> | ||
82 | </p> | ||
83 | |||
84 | <p class=description> | ||
85 | Converts 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> | ||
93 | Returns a string with the first IP address found for <tt>address</tt>, | ||
94 | followed by a table with all information returned by the resolver. | ||
95 | In case of error, the function returns <tt>nil</tt> followed by an error | ||
96 | message. | ||
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> · | ||
106 | <a href="home.html#down">download</a> · | ||
107 | <a href="introduction.html">introduction</a> · | ||
108 | <a href="reference.html">reference</a> | ||
109 | </p> | ||
110 | <p> | ||
111 | <small> | ||
112 | Last modified by Diego Nehab on <br> | ||
113 | Sat Aug 9 01:00:41 PDT 2003 | ||
114 | </small> | ||
115 | </p> | ||
116 | </center> | ||
117 | </div> | ||
118 | |||
119 | </body> | ||
120 | </html> | ||