Commit Graph

385 Commits

Author SHA1 Message Date
root
e716e7347b mime: Remove io dependency
This dependency was spuriously added, maybe for debug reasons,
as confirmed to me by Diego Nehab by mail.
Some systems based in Lua (e.g. Ginga) prohibit the use of
io module for security reasons, so this dependency makes
mime unusable; even worse this makes other modules, based
on mime, unusable too (e.g. html).
2012-04-11 13:45:59 -07:00
Sam Roberts
12bde801f6 Document dirty, getfd, and setfd for select and tcp. 2012-04-11 13:45:59 -07:00
Sam Roberts
3a0fd4744d Reference index was missing documented APIs, and only partially alphabetized. 2012-04-11 13:45:59 -07:00
Sam Roberts
b1f7c349b5 Add support for serial devices as socket streams on unix. 2012-04-11 13:45:59 -07:00
Sam Roberts
3b19f2a7ed testsrvr asserts when test finishes successfully.
When the test client finishes, the test server asserts with a "closed" message.
After looking carefully at this, I think the tests are running
successfully and passing. Since it appears to be a test failure, I
modified the server to allow the client to close the control connection.
2012-04-11 13:45:59 -07:00
Sam Roberts
dace50628c Utility to find how many TCP connections can be made. 2012-04-11 13:45:59 -07:00
Sam Roberts
f63d616bc0 Use poll by default for socket.connect(), instead of select().
Connect timeouts are implemented by waiting on the new socket
descriptor. When select() is used for this, it imposes an arbitrary
limit on the number of connections that can be made, usually 1024-3.
Using poll() removes this limit on the number of simultaneous TCP
connections can be made using luasocket. The previous default
implementation using select() is available by defining SOCKET_SELECT.
Note that using socket.select() always uses select(), so it isn't
possible to wait on an arbitrary number of connections at once.
2012-04-11 13:45:59 -07:00
Sam Roberts
21698c7665 Receive of zero for UDP is now possible.
Previously, receive of zero was considered to be "closed", but that
is only true for stream-based protocols, like TCP.
2012-04-11 13:45:59 -07:00
Sam Roberts
c37f71d062 Test showing failure to receive a zero-length packet. 2012-04-11 13:45:59 -07:00
Sam Roberts
51acb54760 Stop returning an error after successful send of zero length UDP packets
A zero-length send is invalid with TCP, but well defined with UDP.
udp:send"" was returning (nil,"refused"), indicating that it failed when
the packet was actually sent. The test script reproduces the bug, and
includes a tcpdump of the zero length packet being sent.
2012-04-11 13:45:59 -07:00
Sam Roberts
a8b19e5367 OS X CFLAGS definition caused silent failure to build debug version of luasocket.
The luasocket tests require LUASOCKET_DEBUG to be defined at build time,
but for OS X if COMPAT was undefined, the command line looked like
  ... -I -DLUASOCKET_DEBUG ...
so that the the macro definition was silently being treated as the
argument to -I. Result is the macro was never set, and tests would
never run. Fixed by moving -I to the (optional) definition of the
location of compat headers.
2012-04-11 13:45:59 -07:00
Sam Roberts
1f704cfb89 Add all-unix and install-unix targets which include all modules supported on unix.
Besides standard socket and mime modules, this includes unix domain
socket support.
2012-04-11 13:45:59 -07:00
Sam Roberts
826589afcd Add location of Ubuntu's lua5.1 headers to config. 2012-04-11 13:45:59 -07:00
Sam Roberts
dcb92d6268 Support the conventional DESTDIR and prefix variables
Many packaging systems rely on them, they are described here:
- http://www.gnu.org/prep/standards/standards.html#index-prefix
- http://www.gnu.org/prep/standards/standards.html#DESTDIR
2012-04-11 13:45:58 -07:00
Sam Roberts
e3e0dee639 ignore build output 2012-04-11 13:45:58 -07:00
cvs2git convertor
81ebe649f0 This commit was manufactured by cvs2svn to create tag 'luasocket-2-0-2'.
Sprout from master 2007-10-11 21:16:28 UTC Diego Nehab <diego@tecgraf.puc-rio.br> 'Tested each sample.'
Cherrypick from master 2007-05-31 22:27:40 UTC Diego Nehab <diego@tecgraf.puc-rio.br> 'Before sending to Roberto.':
    gem/ltn012.tex
    gem/makefile
2007-10-11 21:16:29 +00:00
Diego Nehab
52ac60af81 Tested each sample. 2007-10-11 21:16:28 +00:00
Diego Nehab
e394956cde Global variable references. 2007-07-11 19:25:47 +00:00
Diego Nehab
185b6d806c Typo. 2007-06-15 06:38:29 +00:00
Diego Nehab
6d23f14aeb Waiting for Roberto's remarks. 2007-06-15 06:29:07 +00:00
Diego Nehab
1c487e4be8 Almost ready to release. 2007-06-15 06:28:56 +00:00
Diego Nehab
e381bde1ea Modified and tested on Linux. 2007-06-12 00:06:29 +00:00
Diego Nehab
c893c7abfb Removed os.exit from test. 2007-06-11 23:52:48 +00:00
Diego Nehab
3cd10f5ab6 Crashy bug fixed in recvraw.
Also fixed returns on closed socket.
2007-06-11 23:44:54 +00:00
Diego Nehab
3074a8f56b Before sending to Roberto. 2007-05-31 22:27:40 +00:00
Diego Nehab
7b195164b0 Lua Gem. 2007-05-31 21:23:42 +00:00
Diego Nehab
37f266ceea Added simple unix tests. 2007-04-09 22:04:13 +00:00
Diego Nehab
be2e467929 Couple bug fixes. 2007-03-12 04:08:40 +00:00
Diego Nehab
8bf9fb51dd Thread safety... 2006-04-28 07:06:42 +00:00
Diego Nehab
9d218a9379 Tested on Windows and it works. 2006-04-26 21:39:27 +00:00
Diego Nehab
3dd6a16bcb Adjusted projects for compat-5.1r5 2006-04-20 04:43:12 +00:00
Diego Nehab
d86af2f680 Tidy. 2006-04-20 04:32:06 +00:00
Diego Nehab
575113fe77 Spell checked and updated modification date. 2006-04-20 04:27:13 +00:00
Diego Nehab
c72632dca5 Reverted back to Linux. 2006-04-20 04:27:01 +00:00
Diego Nehab
75f51d5bc7 Almost ready to release 2.0.1 2006-04-20 04:16:23 +00:00
Diego Nehab
316e205cd4 Reverted to Linux default. 2006-04-18 20:12:27 +00:00
Diego Nehab
61cbb67a27 Adding wishes for 5.2 2006-04-14 08:00:23 +00:00
Diego Nehab
44c7f0f47b Mentions that closed sockets are ignored by select. 2006-04-14 02:04:38 +00:00
Diego Nehab
e8650bbf16 http.request was using old host header during redirects. 2006-04-13 07:00:24 +00:00
Diego Nehab
be57b387d2 Stupid bug was reusing the nreqt.headers.host during redirect. 2006-04-12 08:04:09 +00:00
Diego Nehab
11282d17c8 Almost done 2.0.1. 2006-04-03 04:45:42 +00:00
Diego Nehab
e9d477aba3 Final patches... 2006-04-03 03:10:56 +00:00
Diego Nehab
7121359526 Better image to test mail. 2006-04-02 23:24:37 +00:00
Diego Nehab
93806208c7 Updates for 2.0.1 on the way. 2006-03-19 21:22:21 +00:00
Diego Nehab
09ad4b299c Chose option 1) for http.lua.
Need to fix everything to make sure it works with the new compat-5.1
2006-03-14 09:04:15 +00:00
Diego Nehab
6248b915cb Fixing bugs... 2006-03-13 07:16:39 +00:00
Diego Nehab
00e74c304c Bug in footer. 2005-12-01 21:56:12 +00:00
Diego Nehab
96da86a81f Simplified documentation of send(). 2005-11-24 20:29:28 +00:00
Diego Nehab
7dace4af7e Changed LIB/SHARE to CDIR/LDIR. 2005-11-22 20:51:28 +00:00
Diego Nehab
d55a5826e8 Few tweaks in installation, some missing files, etc. 2005-11-22 08:33:29 +00:00