aboutsummaryrefslogtreecommitdiff
path: root/doc/index.html
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-15 23:00:56 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-15 23:00:56 +0000
commit843a431ef98fd541d98fd3898463985d9bfcde28 (patch)
tree2de4cd78a58ee17aa029528ede8ff5989b819019 /doc/index.html
parentcb03a0e95429cc0d498e77fd50241c87fd2bf3ea (diff)
downloadluasocket-843a431ef98fd541d98fd3898463985d9bfcde28.tar.gz
luasocket-843a431ef98fd541d98fd3898463985d9bfcde28.tar.bz2
luasocket-843a431ef98fd541d98fd3898463985d9bfcde28.zip
Almost done with manual...
Diffstat (limited to 'doc/index.html')
-rw-r--r--doc/index.html77
1 files changed, 52 insertions, 25 deletions
diff --git a/doc/index.html b/doc/index.html
index a2c2d59..c4c1e2f 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -47,7 +47,7 @@ applications that deal with the Internet.
47<p> 47<p>
48Network support has been implemented so that it is both efficient and 48Network support has been implemented so that it is both efficient and
49simple to use. LuaSocket can be used by any Lua application once it has 49simple to use. LuaSocket can be used by any Lua application once it has
50been properly linked with and initialized by the interpreter running the 50been properly initialized by the interpreter running the
51Lua application. The code has been tested and runs well on several Windows 51Lua application. The code has been tested and runs well on several Windows
52and Unix platforms. 52and Unix platforms.
53</p> 53</p>
@@ -61,7 +61,7 @@ LuaSocket.
61</p> 61</p>
62 62
63<p> 63<p>
64Copyright &copy; 1999-2003 Tecgraf/PUC-Rio. All rights reserved. <br> 64Copyright &copy; 1999-2004 Tecgraf/PUC-Rio. All rights reserved. <br>
65Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a> 65Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a>
66</p> 66</p>
67 67
@@ -70,7 +70,7 @@ Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a>
70<h2 id=download>Download</h2> 70<h2 id=download>Download</h2>
71 71
72<p> 72<p>
73LuaSocket version 2.0 alpha is now available for download! It is 73LuaSocket version 2.0 beta is now available for download! It is
74compatible with Lua&nbsp;5.0 and has been tested on 74compatible with Lua&nbsp;5.0 and has been tested on
75Windows&nbsp;XP, Linux, and Mac OS X. 75Windows&nbsp;XP, Linux, and Mac OS X.
76</p> 76</p>
@@ -81,8 +81,8 @@ The library can be downloaded in source code from the following links:
81 81
82<blockquote> 82<blockquote>
83<p> 83<p>
84<a href="luasocket-2.0-alpha.tar.gz">luasocket-2.0-alpha.tar.gz</a> <br> 84<a href="luasocket-2.0-beta.tar.gz">luasocket-2.0-beta.tar.gz</a> <br>
85<a href="luasocket-2.0-alpha.zip">luasocket-2.0-alpha.zip</a> 85<a href="luasocket-2.0-beta.zip">luasocket-2.0-beta.zip</a>
86</p> 86</p>
87</blockquote> 87</blockquote>
88 88
@@ -112,11 +112,11 @@ option, and should be able to run the automatic test procedures.
112<h2 id=thanks>Special thanks</h2> 112<h2 id=thanks>Special thanks</h2>
113 113
114<p> 114<p>
115Throughout LuaSocket its history, many people gave sugestions that helped 115Throughout LuaSocket's history, many people gave sugestions that helped
116improve it. For that, I thank the Lua comunity. 116improve it. For that, I thank the Lua comunity.
117Special thanks go to 117Special thanks go to
118David Burgess, who has pushed the library to a new level of quality and 118David Burgess, who has pushed the library to a new level of quality and
119from whom I have learned a lot stuff that doesn't show up in RFCs. 119from whom I have learned a lot of stuff that doesn't show up in RFCs.
120Special thanks also to Carlos Cassino, who played a big part in the 120Special thanks also to Carlos Cassino, who played a big part in the
121extensible design seen in the C core of LuaSocket 2.0. 121extensible design seen in the C core of LuaSocket 2.0.
122</p> 122</p>
@@ -127,7 +127,7 @@ extensible design seen in the C core of LuaSocket 2.0.
127 127
128 128
129<p> 129<p>
130Most of the changes for 2.0 happened in the C layer, which 130Everything is new! Many changes for 2.0 happened in the C layer, which
131has been almost completely rewritten. The code has been ported to Lua 5.0 131has been almost completely rewritten. The code has been ported to Lua 5.0
132and greatly improved. There have also been some API changes 132and greatly improved. There have also been some API changes
133that made the interface simpler and more consistent. Here are some of 133that made the interface simpler and more consistent. Here are some of
@@ -140,58 +140,85 @@ the changes that made it into version 2.0:
140 pipes (on Unix) and named pipes (on windows) as a bonus; 140 pipes (on Unix) and named pipes (on windows) as a bonus;
141 141
142<li> Following the Lua 5.0 trend, all functions provided by the library are 142<li> Following the Lua 5.0 trend, all functions provided by the library are
143 in the namespace <tt>socket</tt>. Functions such as 143 in namespaces. These should be obtained with calls to the
144 <tt>require</tt> function. Functions such as
144 send/receive/timeout/close etc do not exist anymore as stand-alone 145 send/receive/timeout/close etc do not exist anymore as stand-alone
145 functions. They are now only available as methods of the appropriate 146 functions. They are now only available as methods of the appropriate
146 objects; 147 objects;
147 148
148<li> All functions return a non-nil value as first return value if successful. 149<li> All functions return a non-nil value as first return value if successful.
149 All functions return whatever could be retrieved followed by error message 150 All functions return <b><tt>nil</tt></b> followed by error message
150 in case of error. The best way to check for errors is to check for the 151 in case of error;
151 presence of an error message;
152 152
153<li> UDP connected sockets can break association with peer by calling 153<li> Better error messages and parameter checking;
154
155<li> Should be interrupt safe;
156
157<li> UDP connected sockets can break association with peer by calling
154 <tt>setpeername</tt> with address '<tt>*</tt>'; 158 <tt>setpeername</tt> with address '<tt>*</tt>';
155 159
156<li> TCP has been changed to become more uniform. First create an object, 160<li> TCP has been changed to become more uniform. First create an object,
157 then connect or bind if needed, and finally use I/O functions. The 161 then connect or bind if needed, and finally use I/O functions. The
158 <tt>socket.connect</tt> and <tt>socket.bind</tt> functions are still 162 <tt>socket.connect</tt> and <tt>socket.bind</tt> functions are still
159 provided for simplicity, but they just call <tt>socket.tcp</tt> followed 163 provided for simplicity, but they just call <tt>socket.tcp</tt> followed
160 by the <tt>connect</tt> or <tt>bind</tt> methods; 164 by the <tt>connect</tt> or <tt>bind/listen</tt> methods;
161 165
162<li> Better error messages and parameter checking; 166<li> Greatly reduced the number of times select is called during data
167 transfers, by calling only on failure;
168
169<li> TCP can set timeout value before connecting and also bind to local
170 address before connecting;
171
172<li> <tt>socket.select</tt> returns associative sets and checks if
173 sockets had buffered data;
163 174
164<li> <tt>socket.sleep</tt> and <tt>socket.time</tt> are now part of the 175<li> <tt>socket.sleep</tt> and <tt>socket.time</tt> are now part of the
165 library and are supported. They used to be available only when 176 library and are supported. They used to be available only when
166 LUASOCKET_DEBUG was defined, but it turns out they might be useful for 177 LUASOCKET_DEBUG was defined, but it turns out they might be useful for
167 applications; 178 applications;
168 179
169<li> Socket options interface has been improved and TCP objects also 180<li> <tt>socket.try</tt> and <tt>socket.protect</tt> provide a simple
170 support socket options. 181 interface to exceptions that proved very in the implementation of
182 high-level modules;
183
184<li> Socket options interface has been improved. TCP objects also
185 support socket options and many other options were added.
186
187</ul>
188
189<p>
190Lots of changes in the Lua modules, too. The new MIME and LTN12 modules
191make all other modules much more powerful. The main new functionality is
192the support for multipart messages in the SMTP module.
193</p>
194
195<ul>
196
197<li>
171 198
172</ul> 199</ul>
173 200
201
174<!-- incompatible +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 202<!-- incompatible +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
175 203
176<h3 id=incompatible>Incompatibilities with previous versions</h3> 204<h3 id=incompatible>Incompatibilities with previous versions</h3>
177 205
178<ul> 206<ul>
207
179<li> The introduction of namespaces affects all programs that use LuaSocket, 208<li> The introduction of namespaces affects all programs that use LuaSocket,
180specially code that relies on global functions. These are no longer 209specially code that relies on global functions. These are no longer
181available. Note that even the support modules (<tt>http</tt>, <tt>smtp</tt> 210available. Note that even the support modules (<tt>http</tt>, <tt>smtp</tt>
182etc) have been moved to the namespace (i.e. <tt>socket.http</tt>, 211etc) are independent now and should be "<tt>require</tt>ed";
183<tt>socket.smtp</tt> etc); 212
213<li> FTP, SMTP and HTTP are completely new; I am sure you will
214agree the new stuff is better;
184 215
185<li> WARNING: The new <tt>send</tt>, 216<li> WARNING: The new <tt>send</tt>, <tt><b>receive</b></tt>,
186<tt>sendto</tt>, <tt>setpeername</tt> and <tt>setsockname</tt>, 217<tt>sendto</tt>, <tt>setpeername</tt> and <tt>setsockname</tt>,
187<tt>ftp.put</tt>, <tt>ftp.put_cb</tt> return convention WILL break old code; 218return convention WILL break old code;
188 219
189<li> Interface to options has changed; 220<li> Interface to options has changed;
190 221
191<li> <tt>socket.select</tt> refuses tables that have anything that is not
192an object from the group <tt>select{able}</tt>. This includes even the
193'<tt>n</tt>' field. Silently ignoring objects was a source of bugs for Lua
194programs.
195</ul> 222</ul>
196 223
197<!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 224<!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->