diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-06-14 04:29:23 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-06-14 04:29:23 +0000 |
| commit | 65c35845c54c7f84b1cf5b0e3d4c7bbdaf1014e3 (patch) | |
| tree | f6e3f1a31451281ac2a347c3080e9749456dac29 /doc | |
| parent | 8b114f3bf4ccea3b065551fa94649a9e45935b5b (diff) | |
| download | luasocket-65c35845c54c7f84b1cf5b0e3d4c7bbdaf1014e3.tar.gz luasocket-65c35845c54c7f84b1cf5b0e3d4c7bbdaf1014e3.tar.bz2 luasocket-65c35845c54c7f84b1cf5b0e3d4c7bbdaf1014e3.zip | |
Working on the manual.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/index.html | 94 | ||||
| -rw-r--r-- | doc/reference.html | 4 | ||||
| -rw-r--r-- | doc/socket.html | 8 |
3 files changed, 51 insertions, 55 deletions
diff --git a/doc/index.html b/doc/index.html index cfd3548..ee97e02 100644 --- a/doc/index.html +++ b/doc/index.html | |||
| @@ -93,38 +93,24 @@ Windows XP, Linux, and Mac OS X. | |||
| 93 | </p> | 93 | </p> |
| 94 | 94 | ||
| 95 | <p> | 95 | <p> |
| 96 | The library can be downloaded in source code from the following links: | 96 | The library can be downloaded in source code from the |
| 97 | </p> | 97 | <a href=http://luaforge.net/projects/luasocket/>LuaSocket |
| 98 | 98 | project page</a> at LuaForge. | |
| 99 | <blockquote> | ||
| 100 | <p> | ||
| 101 | <a href="luasocket-2.0.tar.gz">luasocket-2.0.tar.gz</a> <br> | ||
| 102 | <a href="luasocket-2.0.zip">luasocket-2.0.zip</a> | ||
| 103 | </p> | ||
| 104 | </blockquote> | ||
| 105 | |||
| 106 | <p> | ||
| 107 | Besides the full C and Lua source code for the library, the distribution | 99 | Besides the full C and Lua source code for the library, the distribution |
| 108 | contains several examples, this user's manual and basic test procedures. | 100 | contains several examples, this user's manual and basic test procedures. |
| 109 | </p> | 101 | </p> |
| 110 | 102 | ||
| 111 | <p> | 103 | <p> |
| 112 | I am also providing PC Win32 binaries for those that want to give | 104 | Danilo Tuler is mantaining Win32 binaries for LuaSocket, which are also |
| 113 | LuaSocket a try (those on Unix or Mac OS X can just type <tt>make</tt>). | 105 | available from LuaForge. These are compatible with the |
| 114 | These are compatible with the | ||
| 115 | <a href=http://luaforge.net/projects/luabinaries>LuaBinaries</a> | 106 | <a href=http://luaforge.net/projects/luabinaries>LuaBinaries</a> |
| 116 | available from LuaForge. | 107 | available from LuaForge. |
| 117 | </p> | 108 | </p> |
| 118 | 109 | ||
| 119 | <blockquote> | ||
| 120 | <p> | 110 | <p> |
| 121 | <a href="luasocket-2.0-win32.zip">luasocket-2.0-win32.zip</a> | 111 | For those that want to give LuaSocket a quick try, download the |
| 122 | </p> | 112 | stand-alone archive and unpack everything into |
| 123 | </blockquote> | 113 | a directory, say <tt>c:\luasocket</tt>. Then set <tt>LUA_INIT</tt> to load |
| 124 | |||
| 125 | <p> | ||
| 126 | The quick and dirty way to use these binaries is to unpack everything into | ||
| 127 | a directory, say <tt>c:\luasocket</tt>, then set <tt>LUA_INIT</tt> to load | ||
| 128 | the <tt>compat-5.1.lua</tt> and set <tt>LUA_PATH</tt> and | 114 | the <tt>compat-5.1.lua</tt> and set <tt>LUA_PATH</tt> and |
| 129 | <tt>LUA_CPATH</tt> to look for files in the current directory: | 115 | <tt>LUA_CPATH</tt> to look for files in the current directory: |
| 130 | </p> | 116 | </p> |
| @@ -142,10 +128,10 @@ do the following: | |||
| 142 | </p> | 128 | </p> |
| 143 | 129 | ||
| 144 | <pre class=example> | 130 | <pre class=example> |
| 145 | c:\luasocket\> lua | 131 | c:\luasocket\> lua50 |
| 146 | Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio | 132 | Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio |
| 147 | > http = require"socket.http" | 133 | > http = require"socket.http" |
| 148 | > print(http.request"http://www.tecgraf.puc-rio.br/luasocket/") | 134 | > print(http.request"http://www.cs.princeton.edu/~diego/professional/luasocket/") |
| 149 | --> the source to this web page gets dumped to terminal | 135 | --> the source to this web page gets dumped to terminal |
| 150 | </pre> | 136 | </pre> |
| 151 | 137 | ||
| @@ -173,31 +159,39 @@ has been helping a lot too! Thanks to you all! | |||
| 173 | <h2 id=new>What's New</h2> | 159 | <h2 id=new>What's New</h2> |
| 174 | 160 | ||
| 175 | <p> | 161 | <p> |
| 176 | The big change for the 2.0 (beta3) release was the adoption of the Lua 5.1 | 162 | There is no big change for the 2.0 (final) release. It is basically a |
| 177 | package proposal. Naturally, there were a few bug fixes (a beta is a | 163 | bug fix release. The only improvement is in the non-blocking |
| 178 | beta, is a beta). | 164 | support. |
| 179 | </p> | 165 | </p> |
| 180 | 166 | ||
| 181 | <ul> | 167 | <ul> |
| 182 | <li> New compat-5.1 distribution: | 168 | <li> Improved: <tt>tcp{client}:send(data, i)</tt> now returns <tt>(i+sent-1)</tt>. This is great for non-blocking I/O, but might break some code; |
| 183 | <ul> | 169 | <li> Improved: HTTP, SMTP, and FTP functions accept a new field |
| 184 | <li> Installation uses new directory structure; | 170 | <tt>connect</tt> that can be used to replace the function invoked to |
| 185 | <li> Namespace hierarchy is in now back in use (ex. <tt>socket.url</tt> | 171 | create and connect the sockets used internally; |
| 186 | instead of <tt>url</tt>); | 172 | <li> Fixed: <tt>url.absolute()</tt> was not working when <tt>base_url</tt> was |
| 187 | <li> All modules call <tt>require</tt> even for standard libraries; | 173 | already parsed; |
| 188 | </ul> | 174 | <li> Fixed: <tt>http.request()</tt> was redirecting even when the location |
| 189 | <li> <tt>socket.select</tt> wasn't calling <tt>tm_markstart</tt>; | 175 | header was empty (well, it shouldn't be empty); |
| 190 | <li> LTN12 avoids coroutines (so you can go wild on the C side); | 176 | <li> Fixed: <tt>tcp{client}:shutdown()</tt> was checking for group instead of class; |
| 191 | <li> Kludge on wsocket.c:sock_send for windows timeout issue | 177 | <li> Fixed: <tt>socket.try()</tt> can't be used in place of <tt>assert()</tt>. The manual and examples don't do it anymore; |
| 192 | moved to buffer.c:sendraw so it's not a kludge anymore; | 178 | <li> Improved: Get rid of <tt>require("base")</tt> kludge in <tt>package.loaded</tt>; |
| 193 | <li> <tt>socket.protect </tt>only catches errors thrown by <tt>socket.try</tt>; | 179 | <li> Fixedd: Parts of the manual referred to <tt>require("http")</tt> instead of |
| 194 | <li> Fixed <tt>udp:sendto</tt> to call <tt>sock_sendto</tt> instead of | 180 | <tt>require("socket.http")</tt>; |
| 195 | <tt>sock_send</tt>; | 181 | <li> Improved: Changed 'l' prefix in C libraries to 'c' to avoid clash with LHF |
| 196 | <li> <tt>close</tt> wasn't returning 1! | 182 | libraries; |
| 197 | <li> <tt>socket.gettime</tt> returns time since Unix Epoch 1/1/1970 (UTC); | 183 | <li> Improved: Using bundles in Mac OS X; |
| 198 | <li> <tt>socket.sleep</tt> is robust to interrupts; | 184 | <li> Fixed: <tt>luasocket.h</tt> was exporting <tt>luaopen_socket</tt> |
| 199 | <li> <tt>http.PROXY</tt> wasn't working; | 185 | instead of <tt>luaopen_csocket</tt>; |
| 200 | <li> <tt>url.escape</tt> escapes only dangerous characters. | 186 | <li> Fixed: <tt>udp:setpeername()</tt> only worked for |
| 187 | <tt>udp{unconnected}</tt>. Now you can "disconnect" an <tt>UDP</tt> socket; | ||
| 188 | <li> Fixed: bug in http.lua that caused some requests to fail (Florian | ||
| 189 | Berger); | ||
| 190 | <li> Fixed: bug in <tt>select.c</tt> that prevented sockets with descriptor 0 from working (Renato Maia); | ||
| 191 | <li> Fixed: "bug" that caused <tt>dns.toip</tt> to crash under uLinux; | ||
| 192 | <li> Fixed: "bug" that caused a crash in <tt>gethostbyname</tt> under VMS | ||
| 193 | (Renato Maia); | ||
| 194 | <li> Improved: <tt>socket.DEBUG</tt> and <tt>socket.VERSION</tt> became <tt>socket._DEBUGs</tt> and <tt>socket._VERSION</tt> for uniformity with other libraries. | ||
| 201 | </ul> | 195 | </ul> |
| 202 | 196 | ||
| 203 | <!-- incompatible +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 197 | <!-- incompatible +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| @@ -205,9 +199,11 @@ beta, is a beta). | |||
| 205 | <h3 id=incompatible>Incompatibilities with previous versions</h3> | 199 | <h3 id=incompatible>Incompatibilities with previous versions</h3> |
| 206 | 200 | ||
| 207 | <ul> | 201 | <ul> |
| 208 | <li> Namespaces are hierarchical again. This means that whoever used to | 202 | <li> If you use the return value of <tt>tcp:send()</tt> <em>and</em> you |
| 209 | call <tt>require("url")</tt> should update their code to | 203 | use the extra parameters to select only part of the string to be sent, your |
| 210 | <tt>require("socket.url")</tt>. | 204 | code is now broken, but when you fix it, it will be much simpler; |
| 205 | <li> If you check <tt>socket.DEBUG</tt> or <tt>socket.VERSION</tt>, | ||
| 206 | change it to <tt>socket._DEBUG</tt> or <tt>socket._VERSION</tt>. | ||
| 211 | </ul> | 207 | </ul> |
| 212 | 208 | ||
| 213 | <!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 209 | <!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
diff --git a/doc/reference.html b/doc/reference.html index b2e31d5..fd5140b 100644 --- a/doc/reference.html +++ b/doc/reference.html | |||
| @@ -142,7 +142,7 @@ Support, Manual"> | |||
| 142 | <blockquote> | 142 | <blockquote> |
| 143 | <a href="socket.html">Socket</a> | 143 | <a href="socket.html">Socket</a> |
| 144 | <blockquote> | 144 | <blockquote> |
| 145 | <a href="socket.html#debug">DEBUG</a>, | 145 | <a href="socket.html#_debug">_DEBUG</a>, |
| 146 | <a href="dns.html#dns">dns</a>, | 146 | <a href="dns.html#dns">dns</a>, |
| 147 | <a href="socket.html#gettime">gettime</a>, | 147 | <a href="socket.html#gettime">gettime</a>, |
| 148 | <a href="socket.html#newtry">newtry</a>, | 148 | <a href="socket.html#newtry">newtry</a>, |
| @@ -155,7 +155,7 @@ Support, Manual"> | |||
| 155 | <a href="tcp.html#tcp">tcp</a>, | 155 | <a href="tcp.html#tcp">tcp</a>, |
| 156 | <a href="socket.html#try">try</a>, | 156 | <a href="socket.html#try">try</a>, |
| 157 | <a href="udp.html#udp">udp</a>, | 157 | <a href="udp.html#udp">udp</a>, |
| 158 | <a href="socket.html#version">VERSION</a>. | 158 | <a href="socket.html#_version">_VERSION</a>. |
| 159 | </blockquote> | 159 | </blockquote> |
| 160 | </blockquote> | 160 | </blockquote> |
| 161 | 161 | ||
diff --git a/doc/socket.html b/doc/socket.html index 18c71d1..5cc7157 100644 --- a/doc/socket.html +++ b/doc/socket.html | |||
| @@ -85,8 +85,8 @@ the user can also specify the local address and port to bind | |||
| 85 | 85 | ||
| 86 | <!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 86 | <!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| 87 | 87 | ||
| 88 | <p class=name id=debug> | 88 | <p class=name id=_debug> |
| 89 | socket.<b>DEBUG</b> | 89 | socket.<b>_DEBUG</b> |
| 90 | </p> | 90 | </p> |
| 91 | 91 | ||
| 92 | <p class=description> | 92 | <p class=description> |
| @@ -372,8 +372,8 @@ c = socket.try(socket.connect("localhost", 80)) | |||
| 372 | 372 | ||
| 373 | <!-- version ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 373 | <!-- version ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| 374 | 374 | ||
| 375 | <p class=name id=version> | 375 | <p class=name id=_version> |
| 376 | socket.<b>VERSION</b> | 376 | socket.<b>_VERSION</b> |
| 377 | </p> | 377 | </p> |
| 378 | 378 | ||
| 379 | <p class=description> | 379 | <p class=description> |
