Permalink
Browse files

Making progress toward a release

Documented headers.lua
Update copyright date everywhere
Remove RCSID from files
Move version back to 2.1 rather than 2.1.1
Fixed url package to support ipv6 hosts
Changed "domain" to "family" in tcp and udp structures
Implemented getfamily methods
  • Loading branch information...
1 parent f37e026 commit f960b3872a668ed1b53bd50c5b6a708367332f3c @diegonehab diegonehab committed Apr 22, 2012
View
@@ -1,5 +1,5 @@
-LuaSocket 2.0.2 license
-Copyright � 2004-2007 Diego Nehab
+LuaSocket 2.1 license
+Copyright � 2004-2012 Diego Nehab
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
View
2 README
@@ -1,4 +1,4 @@
-This is the LuaSocket 2.1.1. It has been tested on --[[WinXP--]], Mac OS X,
+This is the LuaSocket 2.1. It has been tested on --[[WinXP--]], Mac OS X,
and --[[Linux--]]. Please use the Lua mailing list to report any bugs
(or "features") you encounter.
View
25 TODO
@@ -1,39 +1,40 @@
-- merge luaL_typeerror into auxiliar to avoid using luaL prefix?
- getsockname should also support IPv6, no?
-- remove RCSID from files?
- shouldn't we instead make the code compatible to Lua 5.2
without any compat stuff, and use a compatibility layer to
make it work on 5.1?
-- why 2.1.1 rather than 2.1?
- add what's new to manual
- should there be an equivalent to tohostname for IPv6?
-- should we add service name resolution as well to
- getaddrinfo?
+- should we add service name resolution as well to getaddrinfo?
- document bind and connect behavior based on address?
-- add functionality to query if object is ipv4 or 6?
-- update copyright date everywhere?
-- what to do about author?
- add http POST sample to manual
people keep asking stupid questions
- documentation of dirty/getfd/setfd is problematic because of portability
same for unix and serial.
what to do about this? add a stronger disclaimer?
-- remove references to Lua 5.0 from documentation, add 5.2?
-- update lua and luasocket version in samples in documentation
-- document headers.lua?
- fix makefile with decent defaults?
Done:
+- document headers.lua?
+- update copyright date everywhere?
+- remove RCSID from files?
+- move version to 2.1 rather than 2.1.1?
+- fixed url package to support ipv6 hosts
+- changed domain to family
+- implement getfamily methods.
+
+- remove references to Lua 5.0 from documentation, add 5.2?
+- update lua and luasocket version in samples in documentation
- document ipv5_v6only default option being set?
- document tcp6 and udp6
- document dns.getaddrinfo
-- document zero-sized send on udp vs. tcp?
+- documented zero-sized datagram change?
no.
- document unix socket and serial socket? add raw support?
no.
- document getoption
+- merge luaL_typeerror into auxiliar to avoid using luaL prefix?
View
@@ -95,8 +95,9 @@ <h2 id="http">HTTP</h2>
</blockquote>
<p>
-Field names are case insensitive (as specified by the standard) and all
-functions work with lowercase field names.
+Field names are case insensitive (as specified by the standard) and all
+functions work with lowercase field names (but see
+<a href=socket.html#headers.canonic><tt>socket.headers.canonic</tt></a>).
Field values are left unmodified.
</p>
@@ -117,6 +118,7 @@ <h2 id="http">HTTP</h2>
<li> <tt>USERAGENT</tt>: default user agent reported to server.
</ul>
+
<!-- http.request ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<p class=name id="request">
View
@@ -87,7 +87,7 @@ <h2 id=whatis>What is LuaSocket?</h2>
<h2 id=download>Download</h2>
<p>
-LuaSocket version 2.1.1-rc1 is now available for download!
+LuaSocket version 2.1-rc1 is now available for download!
It is compatible with Lua&nbsp;5.1 and 5.2, and has
been tested on Windows&nbsp;XP, Linux, and Mac OS X. Chances
are it works well on most UNIX distributions and Windows flavors.
@@ -125,7 +125,7 @@ <h2 id=thanks>Special thanks</h2>
<h2 id=new>What's New</h2>
<p>
-Main changes for LuaSocket&nbsp;2.1.1-rc1 are IPv6 support
+Main changes for LuaSocket&nbsp;2.1-rc1 are IPv6 support
and Lua&nbsp;5.2 compatibility.
</p>
@@ -135,6 +135,7 @@ <h2 id=new>What's New</h2>
<ul>
<li> <tt>Socket.connect</tt> and <tt>socket.bind</tt> support IPv6 addresses;
<li> <tt>Getpeername</tt> and <tt>getsockname</tt> support IPv6 addresses;
+<li> URL module updated to support IPv6 host names;
<li> New <tt>socket.tcp6</tt> and <tt>socket.udp6</tt> functions;
<li> New <tt>socket.dns.getaddrinfo</tt> function;
</ul>
View
@@ -39,7 +39,7 @@
<h2>Installation</h2>
-<p> LuaSocket 2.1.1-rc still uses Lua&nbsp;5.1's package
+<p> LuaSocket 2.1-rc still uses Lua&nbsp;5.1's package
system. Users that have already made the switch to
Lua&nbsp;5.2 should leave the default
<tt>LUA_COMPAT_MODULE</tt> defined when compiling their Lua
@@ -95,7 +95,7 @@
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
&gt; socket = require("socket")
&gt; print(socket._VERSION)
---&gt; LuaSocket 2.1.1-rc1
+--&gt; LuaSocket 2.1-rc1
</pre>
<p> Each module loads their dependencies automatically, so you only need to
View
@@ -148,6 +148,7 @@
<a href="socket.html#debug">_DEBUG</a>,
<a href="dns.html#dns">dns</a>,
<a href="socket.html#gettime">gettime</a>,
+<a href="socket.html#headers.canonic">headers.canonic</a>,
<a href="socket.html#newtry">newtry</a>,
<a href="socket.html#protect">protect</a>,
<a href="socket.html#select">select</a>,
View
@@ -90,8 +90,9 @@ <h2 id=smtp>SMTP</h2>
</blockquote>
<p>
-Field names are case insensitive (as specified by the standard) and all
-functions work with lowercase field names.
+Field names are case insensitive (as specified by the standard) and all
+functions work with lowercase field names (but see
+<a href=socket.html#headers.canonic><tt>socket.headers.canonic</tt></a>).
Field values are left unmodified.
</p>
View
@@ -112,6 +112,29 @@ <h2 id=socket>The socket namespace</h2>
print(socket.gettime() - t .. " seconds elapsed")
</pre>
+<!-- socket.headers ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+<p class=name id="headers.canonic">
+socket.headers.<b>canonic</b></p>
+
+<p> The <tt>socket.headers.canonic</tt> table
+is used by the HTTP and SMTP modules to translate from
+lowercase field names back into their canonic
+capitalization. When a lowercase field name exists as a key
+in this table, the associated value is substituted in
+whenever the field name is sent out.
+</p>
+
+<p>
+You can obtain the <tt>headers</tt> namespace if case run-time
+modifications are required by running:
+</p>
+
+<pre class=example>
+-- loads the headers module
+local headers = require("headers")
+</pre>
+
<!-- newtry +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<p class=name id=newtry>
View
@@ -2,7 +2,6 @@
-- Little program to convert to and from Base64
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: b64.lua,v 1.8 2004/06/16 04:28:21 diego Exp $
-----------------------------------------------------------------------------
local ltn12 = require("ltn12")
local mime = require("mime")
View
@@ -3,7 +3,6 @@
-- non-blocking I/O via the dispatcher module.
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $$
-----------------------------------------------------------------------------
local url = require("socket.url")
local dispatch = require("dispatch")
View
@@ -2,7 +2,6 @@
-- Little program to download DICT word definitions
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: dict.lua,v 1.22 2005/11/22 08:33:29 diego Exp $
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
View
@@ -2,7 +2,6 @@
-- A hacked dispatcher module
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $$
-----------------------------------------------------------------------------
local base = _G
local table = require("table")
View
@@ -2,7 +2,6 @@
-- Little program to adjust end of line markers.
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: eol.lua,v 1.8 2005/11/22 08:33:29 diego Exp $
-----------------------------------------------------------------------------
local mime = require("mime")
local ltn12 = require("ltn12")
View
@@ -2,7 +2,6 @@
-- Little program to download files from URLs
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: get.lua,v 1.25 2007/03/12 04:08:40 diego Exp $
-----------------------------------------------------------------------------
local socket = require("socket")
local http = require("socket.http")
View
@@ -3,7 +3,6 @@
-- LuaSocket toolkit.
-- Author: David Burgess
-- Modified by Diego Nehab, but David is in charge
--- RCS ID: $Id: lp.lua,v 1.14 2005/11/21 07:04:44 diego Exp $
-----------------------------------------------------------------------------
--[[
if you have any questions: RFC 1179
View
@@ -2,7 +2,6 @@
-- Little program to convert to and from Quoted-Printable
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: qp.lua,v 1.5 2004/06/17 21:46:22 diego Exp $
-----------------------------------------------------------------------------
local ltn12 = require("ltn12")
local mime = require("mime")
View
@@ -2,7 +2,6 @@
-- TFTP support for the Lua language
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id: tftp.lua,v 1.16 2005/11/22 08:33:29 diego Exp $
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
View
@@ -1,7 +1,7 @@
#--------------------------------------------------------------------------
# Distribution makefile
#--------------------------------------------------------------------------
-DIST = luasocket-2.1.1-rc1
+DIST = luasocket-2.1-rc1
TEST = \
test/README \
View
@@ -2,7 +2,6 @@
-- UDP sample: daytime protocol client
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: daytimeclnt.lua,v 1.11 2004/06/21 06:07:57 diego Exp $
-----------------------------------------------------------------------------
local socket = require"socket"
host = host or "127.0.0.1"
View
@@ -2,7 +2,6 @@
-- UDP sample: echo protocol client
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: echoclnt.lua,v 1.10 2005/01/02 22:44:00 diego Exp $
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "localhost"
View
@@ -2,7 +2,6 @@
-- UDP sample: echo protocol server
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: echosrvr.lua,v 1.12 2005/11/22 08:33:29 diego Exp $
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "127.0.0.1"
View
@@ -2,7 +2,6 @@
-- TCP sample: Little program to dump lines received at a given port
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: listener.lua,v 1.11 2005/01/02 22:44:00 diego Exp $
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "*"
View
@@ -2,7 +2,6 @@
-- TCP sample: Little program to send text lines to a given host/port
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: talker.lua,v 1.9 2005/01/02 22:44:00 diego Exp $
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "localhost"
View
@@ -2,7 +2,6 @@
-- Select sample: simple text line server
-- LuaSocket sample files.
-- Author: Diego Nehab
--- RCS ID: $Id: tinyirc.lua,v 1.14 2005/11/22 08:33:29 diego Exp $
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "*"
View
@@ -1,8 +1,6 @@
/*=========================================================================*\
* Auxiliar routines for class hierarchy manipulation
* LuaSocket toolkit
-*
-* RCS ID: $Id: auxiliar.c,v 1.14 2005/10/07 04:40:59 diego Exp $
\*=========================================================================*/
#include <string.h>
#include <stdio.h>
View
@@ -1,8 +1,6 @@
/*=========================================================================*\
* Input/Output interface for Lua programs
* LuaSocket toolkit
-*
-* RCS ID: $Id: buffer.c,v 1.29 2009/05/27 09:31:35 diego Exp $
\*=========================================================================*/
#include "lua.h"
#include "lauxlib.h"
View
@@ -1,8 +1,6 @@
/*=========================================================================*\
* Simple exception support
* LuaSocket toolkit
-*
-* RCS ID: $Id: except.c,v 1.8 2005/09/29 06:11:41 diego Exp $
\*=========================================================================*/
#include <stdio.h>
View
@@ -2,7 +2,6 @@
-- FTP support for the Lua language
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
View
@@ -2,7 +2,6 @@
-- Canonic header field capitalization
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id$
-----------------------------------------------------------------------------
module("socket.headers")
View
@@ -2,7 +2,6 @@
-- HTTP/1.1 client support for the Lua language.
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id: http.lua,v 1.72 2009/05/27 09:31:35 diego Exp $
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
View
@@ -1,8 +1,6 @@
/*=========================================================================*\
* Internet domain functions
* LuaSocket toolkit
-*
-* RCS ID: $Id: inet.c,v 1.28 2005/10/07 04:40:59 diego Exp $
\*=========================================================================*/
#include <stdio.h>
#include <string.h>
@@ -270,8 +268,8 @@ static void inet_pushresolved(lua_State *L, struct hostent *hp)
/*-------------------------------------------------------------------------*\
* Tries to create a new inet socket
\*-------------------------------------------------------------------------*/
-const char *inet_trycreate(p_socket ps, int domain, int type) {
- return socket_strerror(socket_create(ps, domain, type, 0));
+const char *inet_trycreate(p_socket ps, int family, int type) {
+ return socket_strerror(socket_create(ps, family, type, 0));
}
/*-------------------------------------------------------------------------*\
View
@@ -1,8 +1,6 @@
/*=========================================================================*\
* Input/Output abstraction
* LuaSocket toolkit
-*
-* RCS ID: $Id: io.c,v 1.6 2005/09/29 06:11:41 diego Exp $
\*=========================================================================*/
#include "io.h"
View
@@ -2,7 +2,6 @@
-- LTN12 - Filters, sources, sinks and pumps.
-- LuaSocket toolkit.
-- Author: Diego Nehab
--- RCS ID: $Id: ltn12.lua,v 1.31 2006/04/03 04:45:42 diego Exp $
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Oops, something went wrong.

0 comments on commit f960b38

Please sign in to comment.