| 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 |
<meta name="description" content="The LuaSocket Homepage"> |
| 7 |
<meta name="keywords" content="Lua, LuaSocket, Network, Library, Support, Internet"> |
| 8 |
<title>LuaSocket: Network support for the Lua language </title> |
| 9 |
<link rel="stylesheet" href="reference.css" type="text/css"> |
| 10 |
</head> |
| 11 |
|
| 12 |
<body> |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
<div class=header> |
| 17 |
<hr> |
| 18 |
<center> |
| 19 |
<table summary="LuaSocket logo"> |
| 20 |
<tr><td align=center><a href="http://www.lua.org"> |
| 21 |
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png"> |
| 22 |
</a></td></tr> |
| 23 |
<tr><td align=center valign=top>Network support for the Lua language |
| 24 |
</td></tr> |
| 25 |
</table> |
| 26 |
<p class=bar> |
| 27 |
<a href="index.html">home</a> · |
| 28 |
<a href="index.html#download">download</a> · |
| 29 |
<a href="installation.html">installation</a> · |
| 30 |
<a href="introduction.html">introduction</a> · |
| 31 |
<a href="reference.html">reference</a> |
| 32 |
</p> |
| 33 |
</center> |
| 34 |
<hr> |
| 35 |
</div> |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
<h2 id=whatis>What is LuaSocket?</h2> |
| 40 |
|
| 41 |
<p> |
| 42 |
LuaSocket is a <a href="http://www.lua.org">Lua</a> extension library |
| 43 |
that is composed by two parts: a C core that provides support for the TCP |
| 44 |
and UDP transport layers, and a set of Lua modules that add support for |
| 45 |
functionality commonly needed by applications that deal with the Internet. |
| 46 |
</p> |
| 47 |
|
| 48 |
<p> |
| 49 |
The core support has been implemented so that it is both efficient and |
| 50 |
simple to use. It is available to any Lua application once it has been |
| 51 |
properly initialized by the interpreter in use. The code has been tested |
| 52 |
and runs well on several Windows and UNIX platforms. </p> |
| 53 |
|
| 54 |
<p> |
| 55 |
Among the support modules, the most commonly used implement the |
| 56 |
<a href=smtp.html>SMTP</a> |
| 57 |
(sending e-mails), |
| 58 |
<a href=http.html>HTTP</a> |
| 59 |
(WWW access) and |
| 60 |
<a href=ftp.html>FTP</a> |
| 61 |
(uploading and downloading files) client |
| 62 |
protocols. These provide a very natural and generic interface to the |
| 63 |
functionality defined by each protocol. |
| 64 |
In addition, you will find that the |
| 65 |
<a href=mime.html>MIME</a> (common encodings), |
| 66 |
<a href=url.html>URL</a> |
| 67 |
(anything you could possible want to do with one) and |
| 68 |
<a href=ltn12.html>LTN12</a> |
| 69 |
(filters, sinks, sources and pumps) modules can be very handy. |
| 70 |
</p> |
| 71 |
|
| 72 |
<p> |
| 73 |
The library is available under the same |
| 74 |
<a href="http://www.lua.org/copyright.html"> |
| 75 |
terms and conditions</a> as the Lua language, the MIT license. The idea is |
| 76 |
that if you can use Lua in a project, you should also be able to use |
| 77 |
LuaSocket. |
| 78 |
</p> |
| 79 |
|
| 80 |
<p> |
| 81 |
Copyright © 1999-2013 Diego Nehab. All rights reserved. <br> |
| 82 |
Author: <A href="http://www.impa.br/~diego">Diego Nehab</a> |
| 83 |
</p> |
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
<h2 id=download>Download</h2> |
| 88 |
|
| 89 |
<p> |
| 90 |
LuaSocket version 3.0-rc1 is now available for download! |
| 91 |
It is compatible with Lua 5.1 and 5.2, and has |
| 92 |
been tested on Windows XP, Linux, and Mac OS X. Chances |
| 93 |
are it works well on most UNIX distributions and Windows flavors. |
| 94 |
</p> |
| 95 |
|
| 96 |
<p> |
| 97 |
The current version of the library can be found at |
| 98 |
the <a href="https://github.com/diegonehab/luasocket">LuaSocket |
| 99 |
project page</a> on GitHub. Besides the full C and Lua source code |
| 100 |
for the library, the distribution contains several examples, |
| 101 |
this user's manual and basic test procedures. |
| 102 |
</p> |
| 103 |
|
| 104 |
<p> Take a look at the <a |
| 105 |
href=installation.html>installation</a> section of the |
| 106 |
manual to find out how to properly install the library. |
| 107 |
</p> |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
<h2 id=thanks>Special thanks</h2> |
| 112 |
|
| 113 |
<p> |
| 114 |
This marks the first release of LuaSocket that |
| 115 |
wholeheartedly embraces the open-source development |
| 116 |
philosophy. After a long hiatus, Matthew Wild finally |
| 117 |
convinced me it was time for a release including IPv6 and |
| 118 |
Lua 5.2 support. It was more work than we anticipated. |
| 119 |
Special thanks to Sam Roberts, Florian Zeitz, and Paul |
| 120 |
Aurich, Liam Devine, Alexey Melnichuk, and everybody else |
| 121 |
that has helped bring this library back to life. |
| 122 |
</p> |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
<h2 id=new>What's New</h2> |
| 127 |
|
| 128 |
<p> |
| 129 |
Main changes for LuaSocket 3.0-rc1 are IPv6 support |
| 130 |
and Lua 5.2 compatibility. |
| 131 |
</p> |
| 132 |
|
| 133 |
<ul> |
| 134 |
<li> Added: Compatible with Lua 5.2 |
| 135 |
<ul> |
| 136 |
<li> Note that unless you define <tt>LUA_COMPAT_MODULE</tt>, |
| 137 |
package tables will <em>not</em> be exported as globals! |
| 138 |
</ul> |
| 139 |
<li> Added: IPv6 support; |
| 140 |
<ul> |
| 141 |
<li> <tt>Socket.connect</tt> and <tt>socket.bind</tt> support IPv6 addresses; |
| 142 |
<li> <tt>Getpeername</tt> and <tt>getsockname</tt> support |
| 143 |
IPv6 addresses, and return the socket family as a third value; |
| 144 |
<li> URL module updated to support IPv6 host names; |
| 145 |
<li> New <tt>socket.tcp6</tt> and <tt>socket.udp6</tt> functions; |
| 146 |
<li> New <tt>socket.dns.getaddrinfo</tt> and |
| 147 |
<tt>socket.dns.getnameinfo</tt> functions; |
| 148 |
</ul> |
| 149 |
<li> Added: <tt>getoption</tt> method; |
| 150 |
<li> Fixed: <tt>url.unescape</tt> was returning additional values; |
| 151 |
<li> Fixed: <tt>mime.qp</tt>, <tt>mime.unqp</tt>, |
| 152 |
<tt>mime.b64</tt>, and <tt>mime.unb64</tt> could |
| 153 |
mistaking their own stack slots for functions arguments; |
| 154 |
<li> Fixed: Receiving zero-length datagram is now possible; |
| 155 |
<li> Improved: Hidden all internal library symbols; |
| 156 |
<li> Improved: Better error messages; |
| 157 |
<li> Improved: Better documentation of socket options. |
| 158 |
<li> Fixed: manual sample of HTTP authentication now uses correct |
| 159 |
"authorization" header (Alexandre Ittner); |
| 160 |
<li> Fixed: failure on bind() was destroying the socket (Sam Roberts); |
| 161 |
<li> Fixed: receive() returns immediatelly if prefix can satisfy |
| 162 |
bytes requested (M Joonas Pihlaja); |
| 163 |
<li> Fixed: multicast didn't work on Windows, or anywhere |
| 164 |
else for that matter (Herbert Leuwer, Adrian Sietsma); |
| 165 |
<li> Fixed: select() now reports an error when called with more |
| 166 |
sockets than FD_SETSIZE (Lorenzo Leonini); |
| 167 |
<li> Fixed: manual links to home.html changed to index.html |
| 168 |
(Robert Hahn); |
| 169 |
<li> Fixed: mime.unb64() would return an empty string on results that started |
| 170 |
with a null character (Robert Raschke); |
| 171 |
<li> Fixed: HTTP now automatically redirects on 303 and 307 (Jonathan Gray); |
| 172 |
<li> Fixed: calling sleep() with negative numbers could |
| 173 |
block forever, wasting CPU. Now it returns immediately (MPB); |
| 174 |
<li> Improved: FTP commands are now sent in upper case to |
| 175 |
help buggy servers (Anders Eurenius); |
| 176 |
<li> Improved: known headers now sent in canonic |
| 177 |
capitalization to help buggy servers (Joseph Stewart); |
| 178 |
<li> Improved: Clarified tcp:receive() in the manual (MPB); |
| 179 |
<li> Improved: Decent makefiles (LHF). |
| 180 |
<li> Fixed: RFC links in documentation now point to IETF (Cosmin Apreutesei). |
| 181 |
</ul> |
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
<h2 id=old>Old Versions</h2> |
| 186 |
|
| 187 |
<p> |
| 188 |
All previous versions of the LuaSocket library can be downloaded <a |
| 189 |
href="http://www.impa.br/~diego/software/luasocket/old"> |
| 190 |
here</a>. Although these versions are no longer supported, they are |
| 191 |
still available for those that have compatibility issues. |
| 192 |
</p> |
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
<div class=footer> |
| 197 |
<hr> |
| 198 |
<center> |
| 199 |
<p class=bar> |
| 200 |
<a href="index.html#download">download</a> · |
| 201 |
<a href="installation.html">installation</a> · |
| 202 |
<a href="introduction.html">introduction</a> · |
| 203 |
<a href="reference.html">reference</a> |
| 204 |
</p> |
| 205 |
<p> |
| 206 |
<small> |
| 207 |
Last modified by Diego Nehab on <br> |
| 208 |
Tue Jun 11 18:50:23 HKT 2013 |
| 209 |
</small> |
| 210 |
</p> |
| 211 |
</center> |
| 212 |
</div> |
| 213 |
|
| 214 |
</body> |
| 215 |
</html> |