2022-03-22 19:21:58 +01:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
2003-08-31 03:00:15 +02:00
|
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
2004-06-21 08:07:58 +02:00
|
|
|
<meta name="description" content="The LuaSocket Homepage">
|
2004-11-28 09:17:16 +01:00
|
|
|
<meta name="keywords" content="Lua, LuaSocket, Network, Library, Support, Internet">
|
2003-08-31 03:00:15 +02:00
|
|
|
<title>LuaSocket: Network support for the Lua language </title>
|
|
|
|
<link rel="stylesheet" href="reference.css" type="text/css">
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<!-- header +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
|
|
2022-03-22 19:21:58 +01:00
|
|
|
<div class="header">
|
2003-08-31 03:00:15 +02:00
|
|
|
<hr>
|
|
|
|
<center>
|
|
|
|
<table summary="LuaSocket logo">
|
2022-03-22 19:21:58 +01:00
|
|
|
<tr><td align="center"><a href="http://www.lua.org">
|
|
|
|
<img width="128" height="128" border="0" alt="LuaSocket" src="luasocket.png">
|
2003-08-31 03:00:15 +02:00
|
|
|
</a></td></tr>
|
2022-03-22 19:21:58 +01:00
|
|
|
<tr><td align="center" valign="top">Network support for the Lua language
|
2003-08-31 03:00:15 +02:00
|
|
|
</td></tr>
|
|
|
|
</table>
|
2022-03-22 19:21:58 +01:00
|
|
|
<p class="bar">
|
2009-05-27 11:31:38 +02:00
|
|
|
<a href="index.html">home</a> ·
|
|
|
|
<a href="index.html#download">download</a> ·
|
2004-12-13 07:26:01 +01:00
|
|
|
<a href="installation.html">installation</a> ·
|
2003-08-31 03:00:15 +02:00
|
|
|
<a href="introduction.html">introduction</a> ·
|
2022-03-22 19:21:58 +01:00
|
|
|
<a href="reference.html">reference</a>
|
2003-08-31 03:00:15 +02:00
|
|
|
</p>
|
|
|
|
</center>
|
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- whatis +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
|
|
2022-03-22 19:21:58 +01:00
|
|
|
<h2 id="whatis">What is LuaSocket?</h2>
|
2003-08-31 03:00:15 +02:00
|
|
|
|
|
|
|
<p>
|
|
|
|
LuaSocket is a <a href="http://www.lua.org">Lua</a> extension library
|
2004-06-16 06:28:21 +02:00
|
|
|
that is composed by two parts: a C core that provides support for the TCP
|
2003-08-31 03:00:15 +02:00
|
|
|
and UDP transport layers, and a set of Lua modules that add support for
|
2022-03-22 19:21:58 +01:00
|
|
|
functionality commonly needed by applications that deal with the Internet.
|
2003-08-31 03:00:15 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2004-06-16 06:28:21 +02:00
|
|
|
The core support has been implemented so that it is both efficient and
|
2004-11-29 07:55:47 +01:00
|
|
|
simple to use. It is available to any Lua application once it has been
|
|
|
|
properly initialized by the interpreter in use. The code has been tested
|
2013-06-11 13:10:03 +02:00
|
|
|
and runs well on several Windows and UNIX platforms. </p>
|
2003-08-31 03:00:15 +02:00
|
|
|
|
2004-06-16 06:28:21 +02:00
|
|
|
<p>
|
2022-03-22 19:21:58 +01:00
|
|
|
Among the support modules, the most commonly used implement the
|
|
|
|
<a href="smtp.html">SMTP</a>
|
|
|
|
(sending e-mails),
|
|
|
|
<a href="http.html">HTTP</a>
|
|
|
|
(WWW access) and
|
|
|
|
<a href="ftp.html">FTP</a>
|
2004-06-16 22:41:03 +02:00
|
|
|
(uploading and downloading files) client
|
2004-11-29 07:55:47 +01:00
|
|
|
protocols. These provide a very natural and generic interface to the
|
2022-03-22 19:21:58 +01:00
|
|
|
functionality defined by each protocol.
|
|
|
|
In addition, you will find that the
|
|
|
|
<a href="mime.html">MIME</a> (common encodings),
|
|
|
|
<a href="url.html">URL</a>
|
|
|
|
(anything you could possible want to do with one) and
|
|
|
|
<a href="ltn12.html">LTN12</a>
|
|
|
|
(filters, sinks, sources and pumps) modules can be very handy.
|
2004-06-16 06:28:21 +02:00
|
|
|
</p>
|
|
|
|
|
2003-08-31 03:00:15 +02:00
|
|
|
<p>
|
2022-03-22 19:21:58 +01:00
|
|
|
The library is available under the same
|
2003-08-31 03:00:15 +02:00
|
|
|
<a href="http://www.lua.org/copyright.html">
|
|
|
|
terms and conditions</a> as the Lua language, the MIT license. The idea is
|
2022-03-22 19:21:58 +01:00
|
|
|
that if you can use Lua in a project, you should also be able to use
|
2003-08-31 03:00:15 +02:00
|
|
|
LuaSocket.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2013-06-11 13:10:03 +02:00
|
|
|
Copyright © 1999-2013 Diego Nehab. All rights reserved. <br>
|
2022-03-22 19:21:58 +01:00
|
|
|
Author: <a href="http://www.impa.br/~diego">Diego Nehab</a>
|
2003-08-31 03:00:15 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<!-- download +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
|
|
2022-03-22 19:21:58 +01:00
|
|
|
<h2 id="download">Download</h2>
|
2003-08-31 03:00:15 +02:00
|
|
|
|
|
|
|
<p>
|
2022-03-22 19:21:58 +01:00
|
|
|
LuaSocket version 3.0-rc1 is now available for download!
|
|
|
|
It is compatible with Lua 5.1 and 5.2, and has
|
2006-04-20 06:16:23 +02:00
|
|
|
been tested on Windows XP, Linux, and Mac OS X. Chances
|
2007-06-15 08:38:29 +02:00
|
|
|
are it works well on most UNIX distributions and Windows flavors.
|
2003-08-31 03:00:15 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2013-06-14 13:27:32 +02:00
|
|
|
The current version of the library can be found at
|
2022-03-22 22:16:23 +01:00
|
|
|
the <a href="https://github.com/lunarmodules/luasocket">LuaSocket
|
2022-03-22 19:21:58 +01:00
|
|
|
project page</a> on GitHub. Besides the full C and Lua source code
|
|
|
|
for the library, the distribution contains several examples,
|
2012-04-16 19:15:26 +02:00
|
|
|
this user's manual and basic test procedures.
|
2003-08-31 03:00:15 +02:00
|
|
|
</p>
|
|
|
|
|
2007-06-15 08:28:56 +02:00
|
|
|
<p> Take a look at the <a
|
2022-03-22 19:21:58 +01:00
|
|
|
href="installation.html">installation</a> section of the
|
2007-06-15 08:28:56 +02:00
|
|
|
manual to find out how to properly install the library.
|
2006-04-20 06:32:06 +02:00
|
|
|
</p>
|
2006-04-20 06:16:23 +02:00
|
|
|
|
2004-02-04 15:29:11 +01:00
|
|
|
<!-- thanks +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
|
|
2022-03-22 19:21:58 +01:00
|
|
|
<h2 id="thanks">Special thanks</h2>
|
2004-02-04 15:29:11 +01:00
|
|
|
|
|
|
|
<p>
|
2012-04-16 19:15:26 +02:00
|
|
|
This marks the first release of LuaSocket that
|
|
|
|
wholeheartedly embraces the open-source development
|
2013-06-11 13:10:03 +02:00
|
|
|
philosophy. After a long hiatus, Matthew Wild finally
|
|
|
|
convinced me it was time for a release including IPv6 and
|
|
|
|
Lua 5.2 support. It was more work than we anticipated.
|
|
|
|
Special thanks to Sam Roberts, Florian Zeitz, and Paul
|
|
|
|
Aurich, Liam Devine, Alexey Melnichuk, and everybody else
|
2022-03-22 19:21:58 +01:00
|
|
|
that has helped bring this library back to life.
|
2004-02-04 15:29:11 +01:00
|
|
|
</p>
|
|
|
|
|
2003-08-31 03:00:15 +02:00
|
|
|
<!-- whatsnew +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
|
|
2022-03-22 19:21:58 +01:00
|
|
|
<h2 id="new">What's New</h2>
|
2003-08-31 03:00:15 +02:00
|
|
|
|
2004-06-16 01:00:56 +02:00
|
|
|
<p>
|
2013-06-11 13:10:03 +02:00
|
|
|
Main changes for LuaSocket 3.0-rc1 are IPv6 support
|
2022-03-22 19:21:58 +01:00
|
|
|
and Lua 5.2 compatibility.
|
2007-06-15 08:28:56 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<ul>
|
2022-03-22 19:21:58 +01:00
|
|
|
<li> Added: Compatible with Lua 5.2</li>
|
2013-06-11 13:10:03 +02:00
|
|
|
<ul>
|
|
|
|
<li> Note that unless you define <tt>LUA_COMPAT_MODULE</tt>,
|
2022-03-22 19:21:58 +01:00
|
|
|
package tables will <em>not</em> be exported as globals!</li>
|
2013-06-11 13:10:03 +02:00
|
|
|
</ul>
|
2022-03-22 19:21:58 +01:00
|
|
|
<li> Added: IPv6 support;</li>
|
2012-04-16 19:15:26 +02:00
|
|
|
<ul>
|
2022-03-22 19:21:58 +01:00
|
|
|
<li> <tt>Socket.connect</tt> and <tt>socket.bind</tt> support IPv6 addresses;</li>
|
2012-04-23 18:47:30 +02:00
|
|
|
<li> <tt>Getpeername</tt> and <tt>getsockname</tt> support
|
2022-03-22 19:21:58 +01:00
|
|
|
IPv6 addresses, and return the socket family as a third value;</li>
|
|
|
|
<li> URL module updated to support IPv6 host names;</li>
|
|
|
|
<li> New <tt>socket.tcp6</tt> and <tt>socket.udp6</tt> functions;</li>
|
|
|
|
<li> New <tt>socket.dns.getaddrinfo</tt> and
|
|
|
|
<tt>socket.dns.getnameinfo</tt> functions;</li>
|
2012-04-16 19:15:26 +02:00
|
|
|
</ul>
|
2022-03-22 19:21:58 +01:00
|
|
|
<li> Added: <tt>getoption</tt> method;</li>
|
|
|
|
<li> Fixed: <tt>url.unescape</tt> was returning additional values;</li>
|
|
|
|
<li> Fixed: <tt>mime.qp</tt>, <tt>mime.unqp</tt>,
|
2012-08-01 08:34:06 +02:00
|
|
|
<tt>mime.b64</tt>, and <tt>mime.unb64</tt> could
|
2022-03-22 19:21:58 +01:00
|
|
|
mistaking their own stack slots for functions arguments;</li>
|
|
|
|
<li> Fixed: Receiving zero-length datagram is now possible;</li>
|
|
|
|
<li> Improved: Hidden all internal library symbols;</li>
|
|
|
|
<li> Improved: Better error messages;</li>
|
|
|
|
<li> Improved: Better documentation of socket options.</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Fixed: manual sample of HTTP authentication now uses correct
|
2022-03-22 19:21:58 +01:00
|
|
|
"authorization" header (Alexandre Ittner);</li>
|
|
|
|
<li> Fixed: failure on bind() was destroying the socket (Sam Roberts);</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Fixed: receive() returns immediatelly if prefix can satisfy
|
2022-03-22 19:21:58 +01:00
|
|
|
bytes requested (M Joonas Pihlaja);</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Fixed: multicast didn't work on Windows, or anywhere
|
2022-03-22 19:21:58 +01:00
|
|
|
else for that matter (Herbert Leuwer, Adrian Sietsma);</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Fixed: select() now reports an error when called with more
|
2022-03-22 19:21:58 +01:00
|
|
|
sockets than FD_SETSIZE (Lorenzo Leonini);</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Fixed: manual links to home.html changed to index.html
|
2022-03-22 19:21:58 +01:00
|
|
|
(Robert Hahn);</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Fixed: mime.unb64() would return an empty string on results that started
|
2022-03-22 19:21:58 +01:00
|
|
|
with a null character (Robert Raschke);</li>
|
|
|
|
<li> Fixed: HTTP now automatically redirects on 303 and 307 (Jonathan Gray);</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Fixed: calling sleep() with negative numbers could
|
2022-03-22 19:21:58 +01:00
|
|
|
block forever, wasting CPU. Now it returns immediately (MPB);</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Improved: FTP commands are now sent in upper case to
|
2022-03-22 19:21:58 +01:00
|
|
|
help buggy servers (Anders Eurenius);</li>
|
2013-06-14 13:12:44 +02:00
|
|
|
<li> Improved: known headers now sent in canonic
|
2022-03-22 19:21:58 +01:00
|
|
|
capitalization to help buggy servers (Joseph Stewart);</li>
|
|
|
|
<li> Improved: Clarified tcp:receive() in the manual (MPB);</li>
|
|
|
|
<li> Improved: Decent makefiles (LHF).</li>
|
|
|
|
<li> Fixed: RFC links in documentation now point to IETF (Cosmin Apreutesei).</li>
|
2003-08-31 03:00:15 +02:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- old ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
|
|
2022-03-22 19:21:58 +01:00
|
|
|
<h2 id="old">Old Versions</h2>
|
2003-08-31 03:00:15 +02:00
|
|
|
|
|
|
|
<p>
|
2005-01-03 01:13:14 +01:00
|
|
|
All previous versions of the LuaSocket library can be downloaded <a
|
2012-04-16 19:15:26 +02:00
|
|
|
href="http://www.impa.br/~diego/software/luasocket/old">
|
2005-01-03 01:13:14 +01:00
|
|
|
here</a>. Although these versions are no longer supported, they are
|
2022-03-22 19:21:58 +01:00
|
|
|
still available for those that have compatibility issues.
|
2003-08-31 03:00:15 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
|
|
2022-03-22 19:21:58 +01:00
|
|
|
<div class="footer">
|
2003-08-31 03:00:15 +02:00
|
|
|
<hr>
|
|
|
|
<center>
|
2022-03-22 19:21:58 +01:00
|
|
|
<p class="bar">
|
2009-05-27 11:31:38 +02:00
|
|
|
<a href="index.html#download">download</a> ·
|
2004-12-13 07:26:01 +01:00
|
|
|
<a href="installation.html">installation</a> ·
|
2003-08-31 03:00:15 +02:00
|
|
|
<a href="introduction.html">introduction</a> ·
|
|
|
|
<a href="reference.html">reference</a>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<small>
|
|
|
|
Last modified by Diego Nehab on <br>
|
2013-06-11 13:10:03 +02:00
|
|
|
Tue Jun 11 18:50:23 HKT 2013
|
2003-08-31 03:00:15 +02:00
|
|
|
</small>
|
|
|
|
</p>
|
|
|
|
</center>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|